Skip to content

Commit 919d757

Browse files
thymikeeclaude
andcommitted
test(check-affected): assert the related run replaces a selected provider-integration
The narrowed-plan case passed even when provider-integration was never selected or the related run never ran. It now asserts the plan selects provider-integration, the related run executes, and the provider suite does not. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 988c310 commit 919d757

1 file changed

Lines changed: 16 additions & 6 deletions

File tree

‎scripts/check-affected/run.test.ts‎

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -256,12 +256,22 @@ test('a test-only change leaves the full unit suite to CI', async () => {
256256
});
257257

258258
test('the related run still stands in for provider-integration on a narrowed plan', async () => {
259-
assert.equal(
260-
await runFailingOn('test:integration:provider', [
261-
'packages/platform-apple/src/runner/runner-cache-metadata.ts',
262-
]),
263-
0,
264-
);
259+
const changedFiles = ['packages/platform-apple/src/runner/runner-cache-metadata.ts'];
260+
const plan = selectChecks({ changedFiles, packageEntryFiles: [] });
261+
assert.equal(plan.failOpen, false);
262+
assert.ok(plan.checks.includes('provider-integration'));
263+
const executed: string[][] = [];
264+
const code = await runChecks(plan, { scripts: ALL_SCRIPTS }, ARGS, {
265+
execute: async (command) => {
266+
executed.push(command);
267+
return 0;
268+
},
269+
cwd: '.',
270+
changedFiles,
271+
});
272+
assert.equal(code, 0);
273+
assert.ok(executed.some((command) => command.includes('related')));
274+
assert.ok(!executed.some((command) => command.includes('test:integration:provider')));
265275
});
266276

267277
test('runChecks fails fast on a stale install before running format or any other check', async () => {

0 commit comments

Comments
 (0)