Testing ​
Vitest ​
We use Vitest as our testing framework.
- Vitest collects code coverage information via
@vitest/coverage-v8 - Vitest supports snapshot testing out of the box
- It works with Vue.js (jsdom environment) and Node.js projects
- Each workspace and the
hack/CLI boundary have their own Vitest configurations
To execute all tests, simply run
shell
make testor to include test coverage generation
shell
make test-covYou can also run tests for frontend, backend and charts directly inside the respective folder via
shell
yarn testThe local Dashboard CLI has an independent Node test suite under hack/. Run it directly with:
shell
yarn test:hack
yarn test:hack:covVS Code Integration ​
We recommend the Vitest extension for running and debugging tests directly from the editor. See .vscode/extensions.json for all recommended extensions.
Lint ​
We use ESLint for static code analyzing.
To execute, run
shell
make lintRun only the local Dashboard CLI lint boundary with yarn lint:hack.