vite-plugin-checker icon indicating copy to clipboard operation
vite-plugin-checker copied to clipboard

[Feature request] Treat TypeScript (and potentially other checker) errors as test failures when running Vitest

Open treybrisbane opened this issue 9 months ago • 0 comments

Is your feature request related to a problem? Please describe.

Currently, when running Vitest with vite-plugin-checker configured, checker errors are only logged and do not fail the test run. This is particularly apparent when using the TypeScript checker, as tools like ts-jest treat type errors as test failures by default.

Describe the solution you'd like

An MVP would be:

  • Detection of any TypeScript errors can (configurably) result in the whole Vitest run failing
  • Behaviour is configurable via a boolean flag specific to the TypeScript checker

The ideal solution would be:

  • Any checker errors can (configurably) result in failures of the individual tests (or test files) they appear in
  • Behaviour is configurable via boolean flags specific to each checker implementation

Describe alternatives you've considered

No response

Additional context

No response

Validations

  • [X] Read the docs.
  • [X] Read the Contributing Guidelines.
  • [X] Check that there isn't already an issue that asks for the same feature to avoid creating a duplicate.

treybrisbane avatar May 22 '24 07:05 treybrisbane