cashubtc / cashu-ts

A TypeScript library for building Cashu wallets
MIT License
57 stars 33 forks source link

Tests: Add jsdom to Jest for browser env testing #151

Closed Egge21M closed 18 hours ago

Egge21M commented 3 months ago

Test cases should be run for both node as well as jsdom environments to ensure the library behaves as expected in the browser.

Egge21M commented 3 months ago

Meh... https://github.com/jestjs/jest/pull/11241

Turns out jest's jsdom environment still has some APIs that should not be available in the browser. I guess we can mock those to throw if called