TSDoc Test Reporter for Vitest
npm install @tsdoc-test-reporter/vitestTSDoc Test Reporter for Vitest
``bash`
npm install @tsdoc-test-reporter/vitest
1. Add reporter to config (vite.config.ts)
`ts
///
import { defineConfig } from 'vite';
export default defineConfig({
test: {
reporters: ['@tsdoc-test-reporter/vitest'],
},
});
`
2. Add TSDoc comments to a test of your choice:
`ts`
/**
* @remarks WCAG Criteria
*/
test('get correct background color based on text color', () => {
expect(true).toBe(true);
});
3. Run tests (vitest run)tsdoc-test-reporter-report.html
4. Open the newly generated file in the browser of your choice
`bash``
pnpm nx test vitest