Testing
The player has 132 tests that run in a real Chromium (Vitest + Playwright). They play actual video files: no fake media, no mocks.
npm run setup # downloads Chromium, oncenpm test # about 15 seconds| File | Tests | What it checks |
|---|---|---|
component.test.js | 37 | Attributes, properties, theming, security, translations. |
playback.test.js | 46 | Loading, errors, play and seek, speed, quality, captions, keyboard. |
controls.test.js | 30 | Volume, progress bar, sign-up modal, fullscreen, PiP, auto-hide. |
thumbnails.test.js | 19 | Seek preview, thumbnail sprites, generated thumbnails. |
Run just one part with npx vitest run test/controls.test.js or npx vitest run -t "volume".
If you change the player and a test fails, the test name tells you what behaviour changed. If the change was on purpose, update the test.
On GitHub Actions
Section titled “On GitHub Actions”name: testson: [push, pull_request]jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: { node-version: 22 } - run: npm ci - run: npx playwright install --with-deps chromium - run: npm test