Skip to content

More Examples

All examples are written in TypeScript with Jest as the test runner, but @dfinity/pic can be used with JavaScript and any other testing runner, such as NodeJS, bun or Mocha.

  • The Counter example demonstrates how to work with a simple canister as well as init arguments, canister upgrades and WASM reinstallation.
  • The Clock example demonstrates how to work with the replica’s system time, canister timers as well as checking for canister existence and cycle management.
  • The Todo example demonstrates how to work with more complex canisters, identities, canister upgrades, and stable memory management.
  • The Multicanister example demonstrates how to work with multiple canisters and multiple subnets.
  • The NNS Proxy example demonstrates how to work with an NNS state directory.
  • Google Search example demonstrates how to mock HTTPS Outcalls.