Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(zone.js): jest getRealSystemTime should return native time #39127

Closed
wants to merge 2 commits into from

Conversation

JiaLiPassion
Copy link
Contributor

jest.getRealSystemTime() should return native Date.now(), the
current implemenation return the wrong value which is the fixed
number.

@JiaLiPassion JiaLiPassion added the target: major This PR is targeted for the next major release label Oct 6, 2020
@JiaLiPassion JiaLiPassion force-pushed the jest-fix-1 branch 2 times, most recently from aaefaa4 to 79a5f14 Compare October 6, 2020 04:32
`jest.getRealSystemTime()` should return native `Date.now()`, the
current implemenation return the wrong value which is the fixed
number.
@JiaLiPassion JiaLiPassion force-pushed the jest-fix-1 branch 2 times, most recently from 090d3c7 to a42f2fa Compare October 7, 2020 19:55
In `FakeAsyncZoneSpec`, there are several variables and APIs to identify
different times, and the names are confusing, in this commit, they are
renamed for more clear understandings.

1. currentTickTime, the tick millis advanced.
2. getFakeBaseSystemTime(), return the fake base system time.
3. setFakeBaseSystemTime(), set the fake base system time.
4. getRealSystemTime(), get the underlying native system time.
@mhevery mhevery added the action: merge The PR is ready for merge by the caretaker label Oct 12, 2020
@mhevery
Copy link
Contributor

mhevery commented Oct 12, 2020

presubmit

@ngbot ngbot bot added this to the needsTriage milestone Oct 13, 2020
@mhevery
Copy link
Contributor

mhevery commented Oct 13, 2020

presubmit

@atscott atscott closed this in ffc3332 Oct 13, 2020
atscott pushed a commit that referenced this pull request Oct 13, 2020
…ec (#39127)

In `FakeAsyncZoneSpec`, there are several variables and APIs to identify
different times, and the names are confusing, in this commit, they are
renamed for more clear understandings.

1. currentTickTime, the tick millis advanced.
2. getFakeBaseSystemTime(), return the fake base system time.
3. setFakeBaseSystemTime(), set the fake base system time.
4. getRealSystemTime(), get the underlying native system time.

PR Close #39127
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: zones cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants