Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 89b391c

Browse files
committed
test(zone.js): reduce flakiness of a timer-related test (#59653)
This commit updates a flaky test to increase the amount of work (more `for` loop iterations) to minimize the chance of getting the same timestamp after that work. PR Close #59653
1 parent 0de5049 commit 89b391c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎packages/zone.js/test/jest/jest.spec.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ describe('jest modern fakeTimers with zone.js fakeAsync', () => {
141141
let d = fakeAsyncZoneSpec.getRealSystemTime();
142142
jest.setSystemTime(d);
143143
expect(Date.now()).toEqual(d);
144-
for (let i = 0; i < 100000; i++) {}
144+
for (let i = 0; i < 10_000_000; i++) {}
145145
expect(fakeAsyncZoneSpec.getRealSystemTime()).not.toEqual(d);
146146
d = fakeAsyncZoneSpec.getRealSystemTime();
147147
let timeoutTriggered = false;

0 commit comments

Comments
 (0)