I’m looking for examples on how to test my Motoko canister. Could someone point me to some resources or share examples? Also, what is the recommended approach for testing Motoko canisters, especially with async methods?
Any guidance would be greatly appreciated. Thanks!
This is my current state of the art(not that it is art…but it works). Not a lot of deferred examples in here, but the basic setup should work with pic.js
If you want nns stuff you need to follow the pic.js hides for creating a reusable state.
I tested the Mops package yesterday, but I could. not find any examples showing how to use it in a public canister method for example. I tried it, but I can’t see if the test is working ??
When running a test with PocketIc, I encounter the following error:
Error from Canister lxzze-o7777-77777-aaaaa-cai: Canister’s Wasm module is not valid: Wasmtime failed to validate wasm module wasmtime::Module::validate() failed with memory64 must be enabled for 64-bit memories (at offset 0x5d5).
This is likely an error with the compiler/CDK toolchain being used to build the canister. Please report the error to IC devs on the forum: https://forum.dfinity.org and include which language/CDK was used to create the canister.