You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm kind of new using AssemblyScript. I use it mainly for building subgraph with the @graphprotocol/graph-ts lib, which is ok. Currently I'm working on a repository and it have some utils that I want to test. They are mainly methods to convert from like a BigInt to Bytes, handle strings, or even some other utilities.
The issue is that I'm getting an error when running the tests with imports: TypeError: WebAssembly.instantiate(): Import #1 module="conversion" error: module is not an object or function.
My as-pect.asconfig.json and as-pect.config.js are exactly how the package generate them, but I also tried adding the import to the instantiate async function. I don't understand well this part, but didn't work since I got TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts".
So, I really think that I'm doing something wrong but I can't see where or how make it work. To me make senses that it's possible to do this kind of tests, but I didn't find any example with imports (atm).
Hello guys, hope you all good.
I'm kind of new using AssemblyScript. I use it mainly for building subgraph with the
@graphprotocol/graph-ts
lib, which is ok. Currently I'm working on a repository and it have some utils that I want to test. They are mainly methods to convert from like aBigInt
toBytes
, handle strings, or even some other utilities.The issue is that I'm getting an error when running the tests with imports:
TypeError: WebAssembly.instantiate(): Import #1 module="conversion" error: module is not an object or function
.The code that I have is:
And the test file:
My
as-pect.asconfig.json
andas-pect.config.js
are exactly how the package generate them, but I also tried adding the import to theinstantiate
async function. I don't understand well this part, but didn't work since I gotTypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension ".ts"
.So, I really think that I'm doing something wrong but I can't see where or how make it work. To me make senses that it's possible to do this kind of tests, but I didn't find any example with imports (atm).
My dependencies are:
If someone could help me it will be awesome, I hope it's enough information for this. Thanks for taking time on read this and help :)
The text was updated successfully, but these errors were encountered: