Skip to content

Fixing the Sauce Labs tests and some old browser compatibility #2884

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

Merged
merged 17 commits into from
Oct 22, 2020

Conversation

jgonggrijp
Copy link
Collaborator

The good:

  • Updated the selection of browser versions to include in Sauce Labs testing.
  • Made the _.throttle and _.debounce tests less likely to randomly fail.
  • Added fixes and workarounds for _.isEqual, _.isDataView, _.isMap, _.isWeakMap and _.isSet in older browsers that have partial support for these types.
  • Made tests more aware of browser support so that Firefox 11 doesn't attempt to run the tests that involve DataView.
  • Overall: Travis CI + Sauce Labs should run more reliable again, hence be more informative.

The bad:

  • Testing of IE 8, Safari 7 and Firefox 4 is no longer possible.
  • Three new internal modules just for workarounds.
  • The workaround for _.isMap, _.isWeakMap and _.isSet in IE 11 is quite large.
  • Minified+gzipped weight increases by 230 bytes.

Some older browsers break if the byteOffset argument is undefined.
…nas#2879)

Firefox 11 supports typed arrays but not DataView.

@sktguha FYI. This would change the implementation of your
optimization(s) a bit, but I think the possibility is still there.
…#2879)

Some older browsers support typed arrays but not DataView.
This partially reverts 26356a98d760cb4a57c138a25.
These tests fail relatively often, randomly, though more in some
engines than in others. The random failures are a combination of a
race condition and the imprecision of the global setTimeout function.

This measure shouldn't be taken lightly. It can only be applied if it
does not affect the timing of the throttled (or debounced) function
invocations. In the current patch, only the time at which the result
is read out is slightly delayed so that the readout is less likely to
be too early.

Part of jashkenas#2879, also related to jashkenas#2802.
@jgonggrijp jgonggrijp requested a review from jashkenas October 11, 2020 22:55
@coveralls
Copy link

Coverage Status

Coverage decreased (-1.1%) to 95.16% when pulling dce5d42 on jgonggrijp:saucelabs-fix into d9741b3 on jashkenas:master.

@jgonggrijp
Copy link
Collaborator Author

Coverage decreases because coveralls runs in an engine that doesn't need the workaround code.

@jgonggrijp
Copy link
Collaborator Author

@jashkenas
Copy link
Owner

Sorry for the slowness!

@jgonggrijp
Copy link
Collaborator Author

No problem, thanks for reviewing!

@jgonggrijp jgonggrijp merged commit 1964cdb into jashkenas:master Oct 22, 2020
@jgonggrijp jgonggrijp deleted the saucelabs-fix branch October 22, 2020 20:42
jgonggrijp referenced this pull request in jgonggrijp/underscore Oct 22, 2020
…as#2879)

@sktguha FYI. This would change the implementation of your
optimization(s) a bit, but I think the possibility is still there.
jgonggrijp added a commit that referenced this pull request Oct 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants