18 lines
495 B
TypeScript
18 lines
495 B
TypeScript
import { describe, it, expect } from 'vitest'
|
|
import type { AntiPattern } from '../../src/commands/_anti_patterns'
|
|
|
|
describe('AntiPattern interface', () => {
|
|
it('should accept all 6 required fields', () => {
|
|
const p: AntiPattern = {
|
|
id: 'AP-test-1',
|
|
severity: 'P0',
|
|
wrong: 'wrong way',
|
|
right: 'right way',
|
|
rationale: 'because AI defaults to wrong',
|
|
source: 'drift/R17',
|
|
}
|
|
expect(p.id).toBe('AP-test-1')
|
|
expect(p.severity).toBe('P0')
|
|
})
|
|
})
|