diff --git a/stryker-scope.json b/stryker-scope.json index 3cad8c23b..7625f3dfa 100644 --- a/stryker-scope.json +++ b/stryker-scope.json @@ -8,6 +8,11 @@ "services/commands/fuzzyScore.ts", "services/commands/palettePreferences.ts", "services/commands/commandBuilder.ts" + ], + "testFiles": [ + "tests/unit/commands/fuzzyScore.test.ts", + "tests/unit/commands/palettePreferences.test.ts", + "tests/unit/services/commandBuilder.test.ts" ] }, { diff --git a/tests/unit/tooling/strykerWorkflowPolicy.test.ts b/tests/unit/tooling/strykerWorkflowPolicy.test.ts index f710c0b56..40ceeb407 100644 --- a/tests/unit/tooling/strykerWorkflowPolicy.test.ts +++ b/tests/unit/tooling/strykerWorkflowPolicy.test.ts @@ -30,6 +30,12 @@ describe('Stryker workflow policy', () => { expect(mutationModules).toHaveLength(8); expect(new Set(mutationFiles).size).toBe(25); expect(mutationModules.every(({ riskTier }) => ['A', 'B'].includes(riskTier))).toBe(true); + // QNBS-v3: [Validate the services-commands Stryker mapping / prevent test-scope drift / make the policy contract explicit] + expect(selectMutationModules('services-commands')[0]?.testFiles).toEqual([ + 'tests/unit/commands/fuzzyScore.test.ts', + 'tests/unit/commands/palettePreferences.test.ts', + 'tests/unit/services/commandBuilder.test.ts', + ]); expect(selectMutationModules('tier-a').every(({ riskTier }) => riskTier === 'A')).toBe(true); expect(selectMutationModules('services-commands')).toHaveLength(1); expect(selectMutationModules('copilot')[0]?.testFiles).toEqual([