NotSupportedError: Web Cryptograph API not supported
OR13 opened this issue · 3 comments
OR13 commented
This happens when you try to run the examples in the readme directly with jest
.
I tried creating jest.config.js
, but it did not resolve the issue.
with:
module.exports = {
testEnvironment: 'node',
};
This is likely not a problem with your library, but rather with how jest
handles node modules / es modules by default.
"dependencies": {
"hpke-js": "^0.13.0"
},
"devDependencies": {
"jest": "^29.1.2"
}
Work around... don't use jest.
dajiaji commented
I used to support jest but stopped supporting it when we started supporting Deno.
Could you try testEnvironment: 'jsdom'
?
OR13 commented
I will give it a shot, thanks for the reply.