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 not expecting a "fix" at this point, since it seems the linked Github issue is ongoing and what will eventually fix this, but I open this issue in case others are experiencing this issue and to see if anyone has/will come with a workaround!
The text was updated successfully, but these errors were encountered:
Took a quick look into this. It seems the problem stems from a difference in napi handling between Node and Deno. The tests in this repository are run with Deno and Deno returns a Uint8Array whereas Node returns a Buffer from atomicWrite():
I am trying to test this with Jest (and jsdom), repro here, so I was wondering if someone got it working. The problem I'm having is that JSDom doesn't have TextEncoder/TextDecoder, which according to this guide should be polyfilled like this:
However that, for some reason, makes even the simplest test code to fail, like this:
The error given is this:
This seems to be some sort of mismatch between Node's util.TextEncoder and what Deno's KV is expecting. I made a repro here:
https://github.com/franciscop/jest-kv-repro
I'm not expecting a "fix" at this point, since it seems the linked Github issue is ongoing and what will eventually fix this, but I open this issue in case others are experiencing this issue and to see if anyone has/will come with a workaround!
The text was updated successfully, but these errors were encountered: