Testing
Something that is noticeably lacking from this repository at the moment is testing, which naturally concerns me a little bit. Back in the days of PushJS, Karma & Jasmine were used to test the web push API inside a browser via BrowserStack. Nowadays, these projects aren't as actively maintained and have been replaced with newer, more modern tech such as Jest, Playwright, and Cypress.
It's proved a tad difficult getting features such as ESM and TypeScript working in Karma, and even if it was achieved it seems rather difficult to test something as interactive and robust as the web audio API. Even the popular project Howler.js doesn't have an automated test suite. The options I currently see are:
- Attempt to mock everything out using Jest + JSDOM, even though JSDOM doesn't support the Web Audio API and we'd effectively be building it from scratch
- Write a dummy web project that uses BoothJS, spin up a web server, and run integration tests against it via Playwright
Both of these are pretty high lift, and won't be implemented immediately, so I'm leaving this issue open as an ongoing brainstorm around how this library can best be tested in case anyone else has further ideas or wants to help out :)