nostr-tools >= 2.1.9 no longer compatible with websocket-polyfill, so we are forced to inject WebSocket impl. in Node.js environment.
On the other hand, vitest-websocket-mock only mocks global WebSocket by default. It could mock other impls but for some reason it doesn't work (maybe due to monorepo setting?)
For the reason above, we can't test adapter-nostr-tools-v2 with vitest-websocket-mock...
nostr-tools >= 2.1.9 no longer compatible with websocket-polyfill, so we are forced to inject WebSocket impl. in Node.js environment.
On the other hand, vitest-websocket-mock only mocks global WebSocket by default. It could mock other impls but for some reason it doesn't work (maybe due to monorepo setting?)
For the reason above, we can't test adapter-nostr-tools-v2 with vitest-websocket-mock...