This repo exists to help figure out how to test audio in a browser in a node environment
nvm use
npm ci
npm run build
npm run dev
We have different levels of test cases based on their complexity.
# run all tests
npm run test
# run a single test
npm run test test/__integration_tests__/01-level-02-single-audio-plays-to-end.test.ts
These test cases check very basic functionality against Howler + HowlerMock
- Check that Audio can load
- Check that Audio can play until natural end
- Check that Audio can resume after pause
- Check that Audio can pause
- Check that Audio can stop
These test cases check that the Audio Test Harness can handle more complicated logic around sequences
- Check audio can play after a small delay after loading
- Check audio can resume after a small delay after pausing
These test cases check that the Audio Test Harness can handle multiple streams
- Check that multiple audios can play, pause, stop, end together
These test cases check that the Audio Test Harness can business rules applied to audio
- Check that maximum of two audios can be played at once
- Check that audio can stop another audio