Preact Tests

The test code is located within the same directory as each component, inside a __tests__ directory.

1
2
3
4
$ tree app/javascript/article-form -L 1
app/javascript/article-form
├── __tests__
└── articleForm.jsx

The testing library being used is Jest.

You can run those tests with:

1
npm run test

or

1
yarn test

At the end of the tests execution you will see the code coverage for the Preact components tests.