We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8eb516c commit 64dc2f8Copy full SHA for 64dc2f8
1 file changed
scripts/test.mts
@@ -300,7 +300,16 @@ async function runTests(
300
const vitestCmd = WIN32 ? 'vitest.cmd' : 'vitest'
301
const vitestPath = path.join(nodeModulesBinPath, vitestCmd)
302
303
- const vitestArgs = ['--config', '.config/vitest.config.mts', 'run']
+ // --passWithNoTests: a scoped run where the changed files don't resolve
304
+ // to any test file should succeed rather than error with "No test files
305
+ // found". Keeps pre-commit hooks passing when an edit touches only
306
+ // non-testable code.
307
+ const vitestArgs = [
308
+ '--config',
309
+ '.config/vitest.config.mts',
310
+ 'run',
311
+ '--passWithNoTests',
312
+ ]
313
314
// Add coverage if requested
315
if (coverage) {
0 commit comments