Vitest reporter for identifying slow tests
- If you do not already have it installed, install
vitest
-
Install vitest-slow-test-reporter:
npm i --save-dev vitest-slow-test-reporter
oryarn add -D vitest-slow-test-reporter
-
Use
vitest-slow-test-reporter
by calling vitest with reporter flag:npx vitest --reporter=vitest-slow-test-reporter
or add vitest-slow-test-reporter to your config in
vitest.config.js
:import { defineConfig } from 'vitest/config'; import { VitestSlowTestReporter } from 'vitest-slow-test-reporter' export default defineConfig({ test: { reporters: [new VitestSlowTestReporter()], }, });