Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion scripts/test.mts
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,16 @@ async function runTests(
const vitestCmd = WIN32 ? 'vitest.cmd' : 'vitest'
const vitestPath = path.join(nodeModulesBinPath, vitestCmd)

const vitestArgs = ['--config', '.config/vitest.config.mts', 'run']
// --passWithNoTests: a scoped run where the changed files don't resolve
// to any test file should succeed rather than error with "No test files
// found". Keeps pre-commit hooks passing when an edit touches only
// non-testable code.
const vitestArgs = [
'--config',
'.config/vitest.config.mts',
'run',
'--passWithNoTests',
]

// Add coverage if requested
if (coverage) {
Expand Down
Loading