Skip to content

Commit 80e5eda

Browse files
committed
test(cli): the unknown --object refusal emits only the refusal document; the column-step control
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016GiHYRmLSNWTfbX9gVQkpz
1 parent dac7045 commit 80e5eda

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

‎packages/cli/src/commands/migrate/object-scope.integration.test.ts‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,6 +353,12 @@ describe('[#21644] a deployment-level flag is written only by a full-scope run',
353353
columnMove: null,
354354
columnsMovedAt: null,
355355
});
356+
// The control: over every object it runs, moves the media column and records it.
357+
const control = JSON.parse(full.get('files-to-references')!.run.stdout);
358+
expect(control.columnsMovedAt).toBeTruthy();
359+
expect(control.columnMove.outcomes.map((o: { table: string; status: string }) => [o.table, o.status])).toEqual([
360+
['os21644_product', 'moved'],
361+
]);
356362
});
357363
});
358364

@@ -371,7 +377,11 @@ describe('[#21644] an unknown --object is an error, never narrowed to nothing',
371377
const { run, state } = unknown.get(command)!;
372378
expect(state.flags).toEqual([]);
373379
expect(state.product).toEqual([{ id: 'p1', image: null }]);
374-
expect(run.stdout).not.toContain('scannedObjects');
380+
// The one document is the refusal, and no report: nothing was scanned.
381+
// (`duplicates` keeps its own error shape, a token plus `detail`.)
382+
expect(Object.keys(JSON.parse(run.stdout)).sort()).toEqual(
383+
command === 'duplicates' ? ['code', 'detail', 'error'] : ['code', 'error'],
384+
);
375385
});
376386

377387
it('human mode: exits 1 and names the unknown object', () => {

0 commit comments

Comments
 (0)