[stable13] Limit Sinon version to 5.0.7 at most#9629
Merged
Conversation
When using fake servers with Sinon.JS, the JavaScript test framework, the XHR objects are also fake. In Sinon 5.0.8 the "setRequestHeader" of XMLHttpRequest was modified to normalize the header values (as requested by the spec), but since then only string values are accepted; null or integer values can no longer be passed to "setRequestHeader", as it expects the "replace" function to be available in the object. However, in the tests null and integer values are passed to "setRequestHeader", which causes them to fail. Both Firefox and Chromium accept passing non-string values to their "setRequestHeader" implementation, and it is done, for example, in davclient.js; it is not clear yet whether Sinon got too restrictive or the code calling "setRequestHeader" was too loose. Given that davclient.js is an external dependency, as a temporary measure Sinon version is forced to be 5.0.7 at most until either Sinon or davclient.js are updated. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
skjnldsv
approved these changes
May 28, 2018
Member
Author
|
👍 from my side as well |
danxuliu
approved these changes
May 28, 2018
Member
danxuliu
left a comment
There was a problem hiding this comment.
Let's wait for CI before merging to be sure, but it should pass ;-)
Codecov Report
@@ Coverage Diff @@
## stable13 #9629 +/- ##
=============================================
+ Coverage 50.87% 51.4% +0.53%
Complexity 25097 25097
=============================================
Files 1547 1612 +65
Lines 87719 95520 +7801
Branches 0 1376 +1376
=============================================
+ Hits 44628 49104 +4476
- Misses 43091 46416 +3325
|
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #9627