Stencil web components library is tested with unit tests using Jest.
To run all unit tests use:
npm run k:test:unit
You can find a junit like report and an html report inside ./packages/ketchup/target dir
To run with code coverage use:
npm run k:test:unitcov
You can find a coverage report inside ./packages/ketchup/target
-
Ensure the test file you want to run is open and in the current active window in VS Code.
-
Go to Run and Debug menu.
-
Select the 'Spec Test Current File' (in Run or Debug mode as you want)
Unit tests are in ./packages/ketchup/tests/unit dir. File names start with src files tested.
Mocked data are in *.json files in ./packages/ketchup/tests/resources dir.
If you write new tests keep them uniform to kup-data-table-helper-*spec.ts.
Jest Unit Test Report inside ./packages/ketchup/target dir must be easily understandable.
- Coverage seems not to work correctly