Skip to content
On this page

Testing

Legacy version

You’re browsing the documentation for v4. View the docs for the latest version →

Unit

The project comes pre-configured with the AVA test runner – a lightning fast framework for JavaScript unit tests. All test files should end on *.unit.js. Tests should be placed next to the tested code (e.g. in src/functions or src/components/name).

The styleguide doesn't prescribe the testing framework. If you don't like AVA you can swap it for any other framework.

End-to-end

End-to-end (e2e) testing is tricky. A great solutions is TestCafe which comes pre-configured with the styleguide. All test files should end on *.e2e.js. Tests should be placed next to the tested code (e.g. in src/components/name or src/prototypes).

As with unit testing the e2e testing framework can be replaced with anything you like.

Released under the Hippocratic License 3.0.