Skip to content

Writing tests

Rory Powis edited this page Jan 9, 2018 · 7 revisions

Unit tests

Once you’ve made your changes, run the JavaScript tests to make sure they pass

npm test

If there aren’t any existing tests that cover your changes then write new tests

Visual Regression Tests

To get a base reference for your visual regression tests please save any work on your development branch, checkout your master branch and capture the baseline component screenshots via:

npm run vrt:baseline

To compare your changes please checkout the branch with your changes on then run the comparison tests.

npm run vrt:compare

Your results will be output to vrt-output/report

Clone this wiki locally