To run unit tests for a package:
npm install npm run test
We could look into jsdom for testing as an alternative. Last time we looked things were blocked on https://github.com/jsdom/jsdom/pull/2548, but this is now fixed. Testing with a fake browser has the downside of missing bugs in real browsers, so not sure if this is worth it.