Skip to content

Commit b9fe236

Browse files
committed
test(integ-runner): sort mock calls in snapshot assets diff test
- Sort removeSyncMock.mock.calls before assertion to ensure consistent test results - Reorder expected call array to match sorted output - Prevents test flakiness caused by non-deterministic call ordering
1 parent 5f00685 commit b9fe236

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/@aws-cdk/integ-runner/test/runner/integ-test-runner.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -576,13 +576,13 @@ describe('IntegTest runIntegTests', () => {
576576
testCaseName: 'xxxxx.test-with-snapshot-assets-diff',
577577
});
578578

579-
expect(removeSyncMock.mock.calls).toEqual([
579+
expect(removeSyncMock.mock.calls.sort()).toEqual([
580+
['test/test-data/cdk-integ.out.xxxxx.test-with-snapshot-assets-diff.js.snapshot'],
580581
['test/test-data/cdk-integ.out.xxxxx.test-with-snapshot-assets-diff.js.snapshot'],
581582
['test/test-data/xxxxx.test-with-snapshot-assets-diff.js.snapshot'],
582583
[
583584
'test/test-data/xxxxx.test-with-snapshot-assets-diff.js.snapshot/asset.fec1c56a3f23d9d27f58815e0c34c810cc02f431ac63a078f9b5d2aa44cc3509',
584585
],
585-
['test/test-data/cdk-integ.out.xxxxx.test-with-snapshot-assets-diff.js.snapshot'],
586586
]);
587587
});
588588

0 commit comments

Comments
 (0)