mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-15 11:04:49 +00:00
refactor common test helpers into test/
This way we can share them with multiple tests
This commit is contained in:
committed by
David Lechner
parent
8ba4143fa7
commit
31c3e2b52e
@@ -0,0 +1,36 @@
|
||||
# Testing
|
||||
|
||||
NOTE: This directory contains test helpers. Actual tests are in the `src/`
|
||||
directory.
|
||||
|
||||
|
||||
## Running tests
|
||||
|
||||
yarn test
|
||||
|
||||
Launches the test runner in the interactive watch mode.
|
||||
|
||||
See the section about [running tests][tests] for more information.
|
||||
|
||||
[tests]: https://facebook.github.io/create-react-app/docs/running-tests
|
||||
|
||||
## Code coverage
|
||||
|
||||
yarn coverage
|
||||
|
||||
Launches the test runner in the code coverage mode. Results are displayed in
|
||||
the terminal.
|
||||
|
||||
yarn coverage:html
|
||||
xdg-open coverage/index.html
|
||||
|
||||
Does the same thing except results are converted to more detailed html pages in
|
||||
the `coverage/` directory. (On macOS, use `open` and on Windows use `explorer`
|
||||
instead of `xdg-open` to open the html in your default web browser.)
|
||||
|
||||
|
||||
## Writing tests
|
||||
|
||||
Tests are written using the [Jest][jest] testing framework.
|
||||
|
||||
[jest]: https://jestjs.io/
|
||||
Reference in New Issue
Block a user