Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 1.25 KB

File metadata and controls

49 lines (36 loc) · 1.25 KB

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

make test

or to include test coverage generation

make test-cov

You can also run tests for frontend, backend and charts directly inside the respective folder via

yarn test

The local Dashboard CLI has an independent Node test suite under hack/. Run it directly with:

yarn test:hack
yarn test:hack:cov

VS 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

make lint

Run only the local Dashboard CLI lint boundary with yarn lint:hack.