From f2385ae0382a4c81b423dc4a2067708316b724df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Sat, 26 May 2018 17:10:12 +0200 Subject: [PATCH] Limit Sinon version to 5.0.7 at most MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- build/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/package.json b/build/package.json index b078727805..b388bbf24b 100644 --- a/build/package.json +++ b/build/package.json @@ -24,7 +24,7 @@ "karma-phantomjs-launcher": "*", "phantomjs-prebuilt": "*", "node-sass": "~4.1.1", - "sinon": "*" + "sinon": "<= 5.0.7" }, "engine": "node >= 6.9" }