Détail du package

tdd-guard-vitest

nizos4.9kMIT0.1.6

Vitest reporter for TDD Guard

readme

TDD Guard Vitest Reporter

Vitest reporter that captures test results for TDD Guard validation.

Requirements

  • Node.js 18+
  • Vitest 3.2.0+
  • TDD Guard installed globally

Installation

npm install --save-dev tdd-guard-vitest

Configuration

Vitest Configuration

Add the reporter to your vitest.config.ts:

import { defineConfig } from 'vitest/config'
import { VitestReporter } from 'tdd-guard-vitest'

export default defineConfig({
  test: {
    reporters: ['default', new VitestReporter()],
  },
})

Workspace/Monorepo Configuration

For workspaces or monorepos, pass the project root path to the reporter:

// vitest.config.ts in project root
import { defineConfig } from 'vitest/config'
import { VitestReporter } from 'tdd-guard-vitest'
import path from 'path'

export default defineConfig({
  test: {
    reporters: ['default', new VitestReporter(path.resolve(__dirname))],
  },
})

If your vitest config is in a workspace subdirectory, pass the absolute path to your project root:

new VitestReporter('/Users/username/projects/my-app')

More Information

License

MIT