Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 903 Bytes

Testing.md

File metadata and controls

32 lines (20 loc) · 903 Bytes

This project uses Jest for unit and snapshot testing.

You can run all the tests by

npm test

All test cases can be found under the test folder.

Watch and Rerun

If you are working on a feature using TDD, you can run and watch a particular test by

npm test ./test/stdlib.math.test.ts -- --watch

Snapshot Testing

We use Snapshot Testing for examples to make sure most of the code works as expected.

There are some articles about snapshot testing:

If you made some changes by purpose and it breaks the snapshot testing, you may need to update the snapshot by

npm run test:update