Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 978 Bytes

File metadata and controls

29 lines (19 loc) · 978 Bytes

Testing

Best Practices

Keep code decoupled and functions small and atomic. Always keep testability in mind.

Unit Tests

Use vitest for unit tests. Run them with npm run test.

Unit tests should cover small units of behavior, mainly individual functions. Keep dependencies narrow so tests do not need large mock setups. If code depends on hard-to-test runtime pieces, extract smaller testable units instead of pulling broad entry points into the test.

E2E Tests

Browser E2E tests are split by responsibility:

Run the main browser E2E suite with npm run test:e2e. Run the relay browser E2E suite with npm run test:e2e:relay.

The relay also has Python unit tests and Docker smoke tests under relay/tests.