All examples are written in TypeScript with Jest as the test runner,
but @hadronous/pic
can be used with JavaScript and any other testing runner, such as NodeJS, bun or Mocha.
-
- Replace
bun
withpnpm
in any subsequent commands if you choose to usepnpm
.
- Replace
-
Install dependencies:
bun i
-
Counter This example demonstrates how to work with a simple canister as well as init arguments, canister upgrades and WASM reinstallation.
-
Clock This example demonstrates how to work with the replica's system time, canister timers as well as checking for canister existence and cycle management.
-
Todo This example demonstrates how to work with more complex canisters, identities, canister upgrades, and stable memory management.
-
Multicanister This example demonstrates how to work with multiple canisters and multiple subnets.
-
NNS Proxy This example demonstrates how to work with an NNS state directory.
-
Google Search This example demonstrates how to mock HTTPS Outcalls.