Skip to content
This repository has been archived by the owner on Jan 13, 2025. It is now read-only.

Update lolex to the latest version 🚀 #3507

Merged
merged 14 commits into from
Oct 30, 2018
Merged

Conversation

greenkeeper[bot]
Copy link
Contributor

@greenkeeper greenkeeper bot commented Sep 4, 2018

Version 2.7.2 of lolex was just published.

Dependency lolex
Current Version 2.1.3
Type devDependency

The version 2.7.2 is not covered by your current version range.

If you don’t accept this pull request, your project will work just like it did before. However, you might be missing out on a bunch of new features, fixes and/or performance improvements from the dependency update.

It might be worth looking into these changes and trying to get this project onto the latest version of lolex.

If you have a solid test suite and good coverage, a passing build is a strong indicator that you can take advantage of these changes directly by merging the proposed change into your project. If the build fails or you don’t have such unconditional trust in your tests, this branch is a great starting point for you to work on the update.


Commits

The new version differs by 101 commits.

  • 7f398ea 2.7.2
  • 150eee0 Prepare for new release
  • 4911e15 fix(setInterval): parse timeout arg to integer (#202)
  • 45cf2fb Merge pull request #196 from mroderick/npm-audit
  • adf8886 Upgrade sinon and referee
  • 6dc6eef Upgrade insecure dependencies with npm audit fix
  • f758e90 2.7.1
  • 79f9431 Merge pull request #195 from sinonjs/fix-performance-replacement-on-ios-9
  • 0cfb45e Fix performance replacement on iOS 9.3
  • 4f452ca Update to latest Sinon
  • ef9332b Merge pull request #193 from icebob/master
  • 8fa1bce add .refresh to timer object.
  • a13afb9 fixes #191 - ref(), unref() return value on NodeJS
  • 8a30ce6 Add Safari 9 to list of Sauce Labs browsers
  • 6dace23 2.7.0

There are 101 commits in total.

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper bot 🌴

greenkeeper bot added a commit that referenced this pull request Sep 5, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Sep 5, 2018

Version 2.7.3 just got published.

Update to this version instead 🚀

Commits

The new version differs by 6 commits.

  • 93cf301 2.7.3
  • ad6acab Prepare for new release
  • 784a0fd Merge pull request #203 from fatso83/200-fix-perf-mark-typeerro
  • aaf478a Remove assertions that are already covered by other tests
  • 4a3908c Set performance.* methods to a no-op
  • 0c66e12 Add regression test for #200: TypeError on performance.mark

See the full diff

greenkeeper bot added a commit that referenced this pull request Sep 5, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Sep 5, 2018

Version 2.7.4 just got published.

Update to this version instead 🚀

Commits

The new version differs by 6 commits.

  • 5c39f53 2.7.4
  • 78886fe Prepare for new release
  • 58e171a Merge pull request #204 from fatso83/fix-release-bug-safari-ie
  • 3f73780 Simplify performance method logic
  • ef87229 Fix for IE 10 and IE 11
  • 4306022 Merge two tests, add guard for perfomance.mark()

See the full diff

greenkeeper bot added a commit that referenced this pull request Sep 19, 2018
@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Sep 19, 2018

  • The devDependency lolex was updated from 2.1.3 to 2.7.5.

Update to this version instead 🚀

Commits

The new version differs by 9 commits.

  • 927609c 2.7.5
  • 76c212d Updated release files for 2.7.5
  • c4ee56d fix: handle floating point in hrtime (#210)
  • cbaa8ba Merge pull request #208 from SimenB/run-to-last-loop
  • f1f80da fix: reset high resolution timer on clock.reset (#209)
  • a6c0308 clarify test
  • ee3862e simplify test
  • 4983ee8 fix: runToLast should respect current time
  • 1278eaa Add an error when creating a clock with no Date object (#205)

See the full diff

@greenkeeper
Copy link
Contributor Author

greenkeeper bot commented Oct 8, 2018

  • The devDependency lolex was updated from 2.1.3 to 3.0.0.

Update to this version instead 🚀

Commits

The new version differs by 18 commits.

  • 24b33cc 3.0.0
  • 7515e15 Updated release files for 3.0.0
  • 00f3a5f Merge pull request #215 from thejohnfreeman/master
  • 120d39e Merge pull request #214 from fatso83/207-high-res
  • 16769a1 Remove extra empty line
  • 6b5f51f Add documentation for countTimers
  • a5e56bb Handle fresh clock
  • 3ff4935 Add countTimers method
  • afd5f58 Truncate sub-nanosecond values
  • 4d1a8f7 Throw on negative ticks
  • d71db50 Fix cloud tests and linting warnings
  • d7b6bb3 Compensate for setSystemTime() in hrtime()
  • a6a2355 Fix #207 - also avoid exposing hrNow
  • 82b8ca0 Add multiple test-cases correct #207 behaviour
  • d4c2c05 Merge pull request #211 from fatso83/release-scripts

There are 18 commits in total.

See the full diff

greenkeeper bot added a commit that referenced this pull request Oct 8, 2018
@mdc-web-bot
Copy link
Collaborator

All 557 screenshot tests passed for commit 2a8f65d vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 557 screenshot tests passed for commit e312180 vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 557 screenshot tests passed for commit e312180 vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 557 screenshot tests passed for commit ca095c9 vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 557 screenshot tests passed for commit ca095c9 vs. master! 💯🎉

@abhiomkar
Copy link
Collaborator

Fixed bunch of tests with following:

  1. uninstall lolex's clock when test case ends.
  2. restore mock rAF after mocking rAF.
  3. mock only setTimeout and clearTimeout when installing lolex.
  4. Add appropriate tick duration when needed in few test cases.

Karma test times out without any useful error message. Still need investigation if we're not calling .flush when mocking rAF in any of the tests.

WARN [Chrome 69.0.3497 (Mac OS X 10.13.6)]: Disconnected (1 times)reconnect failed before timeout of 40000ms

Chrome 69.0.3497 (Mac OS X 10.13.6) ERROR
  Disconnectedreconnect failed before timeout of 40000ms
Chrome 69.0.3497 (Mac OS X 10.13.6): Executed 695 of 1850 DISCONNECTED (1 min 16.047 secs / 5.309 secs)
11 10 2018 11:18:17.968:WARN [launcher]: Chrome was not killed in 2000 ms, sending SIGKILL.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ test:unit: `karma start --single-run`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the @ test:unit script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Investigate if we can use lolex's to mock rAF and replace all calls to createMockRaf().

@mdc-web-bot
Copy link
Collaborator

All 557 screenshot tests passed for commit dcbca37 vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 557 screenshot tests passed for commit d8d60b3 vs. master! 💯🎉

FIXME: One ripple test is failing which suggests things aren't working as intended...
@kfranqueiro
Copy link
Contributor

I pushed an experimental/lolex-centralized branch based on this one, replacing createMockRaf usage with lolex everywhere, and added a module to centralize installing/uninstalling lolex so we can easily uninstall it during afterEach on all tests.

Currently one test fails on the branch, but that failure suggests that something might not be operating quite like we expect it to with lolex used for both timeouts and rAFs.

@kfranqueiro kfranqueiro added this to the R21 (v0.42.0) milestone Oct 23, 2018
@kfranqueiro kfranqueiro self-assigned this Oct 24, 2018
@codecov-io
Copy link

codecov-io commented Oct 29, 2018

Codecov Report

❗ No coverage uploaded for pull request base (master@e9b69d0). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #3507   +/-   ##
=========================================
  Coverage          ?   98.67%           
=========================================
  Files             ?      126           
  Lines             ?     5594           
  Branches          ?      746           
=========================================
  Hits              ?     5520           
  Misses            ?       74           
  Partials          ?        0

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update e9b69d0...e2d7659. Read the comment docs.

@mdc-web-bot
Copy link
Collaborator

All 652 screenshot tests passed for commit f3c4fca vs. master! 💯🎉

@mdc-web-bot
Copy link
Collaborator

All 652 screenshot tests passed for commit b3ca1ec vs. master! 💯🎉

@kfranqueiro kfranqueiro force-pushed the greenkeeper/lolex-2.7.2 branch from b3ca1ec to e2d7659 Compare October 30, 2018 14:15
@mdc-web-bot
Copy link
Collaborator

All 652 screenshot tests passed for commit e2d7659 vs. master! 💯🎉

@kfranqueiro kfranqueiro merged commit 7c60849 into master Oct 30, 2018
@kfranqueiro kfranqueiro deleted the greenkeeper/lolex-2.7.2 branch October 30, 2018 14:42
adrianschmidt pushed a commit to Lundalogik/material-components-web that referenced this pull request Jan 4, 2019
This updates lolex to 3.0.0, which now covers rAF as well, so createMockRaf has been removed.

`clock.runToFrame()` replaces `mockRaf.flush()`, and
`clock.countTimers()` replaces `mockRaf.pendingFrames.length`.

This also creates a centralized `test/unit/helpers/clock` module to avoid
any missed cleanup of mocked timeout/rAF functions.
Instead of using lolex directly in unit tests, import the clock module's
`install` function and call that. It creates a lolex instance and stores it
within the module, and there is a "global" afterEach set up to uninstall it
if it exists, after every test in every suite.

(cherry picked from commit 7c60849)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants