Skip to content

Testing

The player has 132 tests that run in a real Chromium (Vitest + Playwright). They play actual video files: no fake media, no mocks.

Terminal window
npm run setup # downloads Chromium, once
npm test # about 15 seconds
FileTestsWhat it checks
component.test.js37Attributes, properties, theming, security, translations.
playback.test.js46Loading, errors, play and seek, speed, quality, captions, keyboard.
controls.test.js30Volume, progress bar, sign-up modal, fullscreen, PiP, auto-hide.
thumbnails.test.js19Seek 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.

.github/workflows/test.yml
name: tests
on: [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