Is there a way to get a Chain client working within a Jest test? The error I get is: ReferenceError: fetch is not defined so I try to fix it with jest-fetch-mock and replaced in jestSetup.js as: require('jest-fetch-mock').enableMocks(); the error becomes:
FetchError {
message: 'invalid json response body at reason: Unexpected end of JSON input',
type: 'invalid-json'
}
I will try to test in the new 5.0. As you can see all the generated functions are now legit .ts files being generated by produce-lib script back to string
Is there a way to get a
Chain
client working within a Jest test? The error I get is:ReferenceError: fetch is not defined
so I try to fix it with jest-fetch-mock and replaced injestSetup.js
as:require('jest-fetch-mock').enableMocks();
the error becomes:The client is defined as:
Test query I'm trying:
Any help is appreciated. Thanks. (Love Zeus ✊ ⚡️)