From ef5ae3a359e7200505f2bd432d0d7c756cbcf352 Mon Sep 17 00:00:00 2001 From: gitdevine <210788251+gitdevine@users.noreply.github.com> Date: Tue, 16 Jun 2026 02:02:36 +0200 Subject: [PATCH] test(provider-flags): exclude all test files from the consumed-flag scan CodeRabbit follow-up: the "registered flags are actually consumed" check only skipped the registry and its own test, so a flag referenced solely by another test fixture would still look consumed. Skip every *.test.* file so the assertion proves real runtime consumption. Co-Authored-By: Claude Fable 5 --- src/utils/providerSelectionFlags.test.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/utils/providerSelectionFlags.test.ts b/src/utils/providerSelectionFlags.test.ts index 7f4a3a9b1..6c53a98ba 100644 --- a/src/utils/providerSelectionFlags.test.ts +++ b/src/utils/providerSelectionFlags.test.ts @@ -49,12 +49,12 @@ describe('PROVIDER_SELECTION_FLAGS parity', () => { const glob = new Bun.Glob('**/*.{ts,tsx}') let allContent = '' for (const relPath of glob.scanSync({ cwd: srcRoot })) { - // Exclude the registry itself (and its test) so the assertion proves the - // flag is referenced by real runtime code, not just by its own - // definition — otherwise the check is tautological. + // Exclude the registry itself and every test file so the assertion proves + // the flag is referenced by real runtime code, not just by its own + // definition or by a fixture — otherwise the check is tautological. if ( relPath.endsWith('providerSelectionFlags.ts') || - relPath.endsWith('providerSelectionFlags.test.ts') + /\.test\.[tj]sx?$/.test(relPath) ) { continue }