Skip to content

Test Coverage in Quiet

kingalg edited this page Oct 25, 2024 · 1 revision

Test Coverage in Quiet

Quiet includes partial test coverage. When addressing bugs or developing new features, please ensure the following:

  • Adjust existing tests as needed to maintain accuracy.
  • Create new tests, especially when implementing new features.

For an overview of the Quiet test structure and instructions on how to run tests, refer to this video recorded in October 2024:
Testing Overview Video


Quick Reference for Running Tests

To run specific tests within a package, use:

npx lerna run test --scope <package> -- <fuzzy_matched_string_for_specific_test>

For example, as shown at 7:36 in the video:

npx lerna run test --scope @quiet/backend -- connections

For end-to-end (e2e) tests, run:

npx lerna run test --scope e2e-tests

Some tests use snapshots (see 11:20–17:00 in the video). If you’ve intentionally modified the HTML output covered by a snapshot test, verify your changes and then update the snapshot by running:

-u

From the video, you can also learn about mocking in Quiet (17:00–23:30).

Currently, integration tests are broken and should be skipped (more info at 36:53 in the video).

Clone this wiki locally