Skip to content

Commit ffc3332

Browse files
JiaLiPassionatscott
authored andcommittedOct 13, 2020
fix(zone.js): jest getRealSystemTime should return native time (#39127)
`jest.getRealSystemTime()` should return native `Date.now()`, the current implemenation return the wrong value which is the fixed number. PR Close #39127
1 parent 8fd25d9 commit ffc3332

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

Diff for: ‎packages/zone.js/lib/jest/jest.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ Zone.__load_patch('jest', (context: any, Zone: ZoneType, api: _ZonePrivate) => {
200200
return function(self: any, args: any[]) {
201201
const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
202202
if (fakeAsyncZoneSpec && isPatchingFakeTimer()) {
203-
return fakeAsyncZoneSpec.getCurrentRealTime(args[0]);
203+
return fakeAsyncZoneSpec.getRealSystemTime();
204204
} else {
205205
return delegate.apply(self, args);
206206
}

0 commit comments

Comments
 (0)
Please sign in to comment.