Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.31 KB

File metadata and controls

47 lines (33 loc) · 1.31 KB

Testing Thunderdome

In effort to maintain a stable application Thunderdome is supported by automated testing

End to End Testing

Playwright is used for End to End testing of Thunderdome, keep tests atomic!

cd e2e
npm ci
npx playwright install --with-deps
npm test

Frontend Unit Testing

Frontend unit tests are run with Vitest and use Playwright browser automation for Svelte component testing via vitest-browser-svelte.

If not already installed, install UI deps and Playwright

cd ui
npm ci
npx playwright install --with-deps

Then you can run tests

task test-ui

Conventions for Frontend Unit Tests

  • Refer to vitest-browser-svelte documentation for Svelte component testing patterns
  • Test files are named {componentName}.test.ts
  • Test files can be placed either:
    • Alongside source files as {componentName}.test.ts
    • In __tests__ folders: ui/src/pages/__tests__/*.test.ts corresponds to ui/src/pages/*.svelte
  • Tests run in a Playwright browser environment (Chromium by default)

Go Unit Testing

Run task test-go to run go tests