Skip to content

Update lolex to version 2#12486

Merged
rsimha merged 2 commits intoampproject:masterfrom
rsimha:2017-12-15-Lolex
Dec 15, 2017
Merged

Update lolex to version 2#12486
rsimha merged 2 commits intoampproject:masterfrom
rsimha:2017-12-15-Lolex

Conversation

@rsimha
Copy link
Copy Markdown
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 requested a review from jridgewell December 15, 2017 23:05
@rsimha rsimha self-assigned this Dec 15, 2017
@rsimha
Copy link
Copy Markdown
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.

4 participants