typescript-testing-e5d2f0 — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited typescript-testing-e5d2f0 (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
import { describe, it, expect, beforeEach, vi } from 'vitest'vi.mock()src/
└── application/
└── services/
├── __tests__/
│ ├── service.test.ts # Unit tests
│ └── service.int.test.ts # Integration tests
└── service.ts{target-file-name}.test.ts{target-file-name}.int.test.tsRecommended: Keep all tests always active
Avoid: test.skip() or commenting out
Include boundary values and error cases alongside happy paths.
it('returns 0 for empty array', () => expect(calc([])).toBe(0))
it('throws on negative price', () => expect(() => calc([{price: -1}])).toThrow())Use literal values for assertions. Do not replicate implementation logic. Valid test: Expected value != Mock return value (implementation transforms/processes data)
expect(calcTax(100)).toBe(10) // not: 100 * TAX_RATEVerify results, not invocation order or count.
expect(mock).toHaveBeenCalledWith('a') // not: toHaveBeenNthCalledWithEach test must include at least one verification.
it('creates user', async () => {
const user = await createUser({name: 'test'})
expect(user.id).toBeDefined()
})Mock only direct external I/O dependencies. Use real implementations for indirect dependencies.
vi.mock('./database') // external I/O onlyUse fast-check when verifying invariants or properties.
import fc from 'fast-check'
it('reverses twice equals original', () => {
fc.assert(fc.property(fc.array(fc.integer()), (arr) => {
return JSON.stringify(arr.reverse().reverse()) === JSON.stringify(arr)
}))
})Usage condition: Use when Property annotations are assigned to ACs in Design Doc.
// Only required parts
type TestRepo = Pick<Repository, 'find' | 'save'>
const mock: TestRepo = { find: vi.fn(), save: vi.fn() }
// Only when absolutely necessary, with clear justification
const sdkMock = {
call: vi.fn()
} as unknown as ExternalSDK // Complex external SDK type structureMocks validate call patterns but cannot verify data layer correctness. The following pass through undetected with mock-only testing:
Options for verifying data layer correctness against a real database engine:
The appropriate approach depends on project environment and CI/CD capabilities.
import { describe, it, expect, vi } from 'vitest'
vi.mock('./userService', () => ({
getUserById: vi.fn(),
updateUser: vi.fn()
}))
describe('ComponentName', () => {
it('should follow AAA pattern', () => {
const input = 'test'
const result = someFunction(input)
expect(result).toBe('expected')
})
})~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.