Save Vitest test results as a JSON file
A Vitest test reporter to create test reports that follow the CTRF standard.
It will generate a JSON file report.json
in the vitest-ctrf
folder (it is configurable). To show the report, you can use the ctrf action.
pnpm i -D vitest-ctrf-json-reporter
Add new custom reporter vite.config.ts
import { defineConfig } from 'vitest/config'
export default defineConfig({
test: {
reporters: ['vitest-ctrf-json-reporter'],
},
})
author: Ganesh Developed BY : JavaScript Developer