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

Update lolex to version 2 #12486

Merged
merged 2 commits into from Dec 15, 2017
Merged

Update lolex to version 2 #12486

merged 2 commits into from Dec 15, 2017

Conversation

rsimha
Copy link
Contributor

@rsimha rsimha commented Dec 15, 2017

This PR updates the lolex timer library used by AMP to version 2. It also fixes all instances of invalid usage of the lolex library in the unit tests.

Invalid examples

clock = lolex.install(win);
clock = lolex.install(win, 0, ['Date', 'setTimeout', 'clearTimeout']);

Valid examples

clock = lolex.install();
clock = lolex.install({toFake: ['Date', 'setTimeout', 'clearTimeout']});

Proper cleanup

clock.uninstall();

Partial fix for #12181

@rsimha rsimha self-assigned this Dec 15, 2017
@rsimha
Copy link
Contributor Author

rsimha commented Dec 15, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants