docs.sivert.io
Developers

Testing

How the MAT test suite is organized and how to run it.

This project uses Playwright for end-to-end and API tests.

Test layout

  • tests/helpers/: shared utilities and fixtures
  • tests/api/: API tests (no UI interaction)
  • tests/ui/: UI tests (browser interaction)
  • tests/setup.spec.ts: global setup (runs first)

Running tests

# Run all tests (uses Docker Compose)
yarn test

# UI mode (interactive)
yarn test:ui

# API only
yarn test:api

Tips

  • Prefer helpers to avoid duplication.
  • Keep test files reasonably small (split large suites).
  • Use tags like @api, @ui, @veto for filtering.

Simulation mode for testing

Simulation mode can be useful when you want to test match flows without real players.

  • Dev Tools must be enabled (dev mode, or VITE_ENABLE_DEV_PAGE=true).
  • In production-like environments, simulation mode is gated behind MATCHZY_ENABLE_SIMULATION_IN_PROD=true.

How is this guide?

Last updated on

On this page