Skip to content

Latest commit

 

History

History
27 lines (22 loc) · 1.4 KB

README.md

File metadata and controls

27 lines (22 loc) · 1.4 KB

Examples

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.

Setup

  • Install bun OR install pnpm

    • Replace bun with pnpm in any subsequent commands if you choose to use pnpm.
  • 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.