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
This commit is contained in:
JiaLiPassion 2020-10-06 12:07:34 +09:00 committed by atscott
parent 8fd25d9614
commit ffc3332dcd
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ Zone.__load_patch('jest', (context: any, Zone: ZoneType, api: _ZonePrivate) => {
return function(self: any, args: any[]) {
const fakeAsyncZoneSpec = Zone.current.get('FakeAsyncTestZoneSpec');
if (fakeAsyncZoneSpec && isPatchingFakeTimer()) {
return fakeAsyncZoneSpec.getCurrentRealTime(args[0]);
return fakeAsyncZoneSpec.getRealSystemTime();
} else {
return delegate.apply(self, args);
}