aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2021-12-01 12:46:33 +0100
committerMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2021-12-01 13:25:52 +0100
commit81fa1e2ae9f5d3f666b8d8f844703110bfe4051f (patch)
tree9ca1a5491e690d86b41fae99bb06a3c47b9bc021 /test/unit
parent7439e221c02abe6690b38afece519f830481e179 (diff)
downloadjquery-81fa1e2ae9f5d3f666b8d8f844703110bfe4051f.tar.gz
jquery-81fa1e2ae9f5d3f666b8d8f844703110bfe4051f.zip
Tests: Skip ETag AJAX tests on TestSwarm
TestSwarm is now proxied via Cloudflare which cuts out headers relevant for ETag tests, failing them. We're still running those tests in Karma on Chrome & Firefox (including Firefox ESR). Closes gh-4974 (cherry picked from commit 00c060d1619d472a2d8c5b104ed76fa3afc2ce97)
Diffstat (limited to 'test/unit')
-rw-r--r--test/unit/ajax.js23
1 files changed, 18 insertions, 5 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js
index dee96b36d..3167ce342 100644
--- a/test/unit/ajax.js
+++ b/test/unit/ajax.js
@@ -1557,12 +1557,25 @@ QUnit.module( "ajax", {
function( label, cache ) {
jQuery.each(
{
- "If-Modified-Since": "mock.php?action=ims",
- "Etag": "mock.php?action=etag"
+ "If-Modified-Since": {
+ url: "mock.php?action=ims",
+ qunitMethod: "test"
+ },
+ "Etag": {
+ url: "mock.php?action=etag",
+
+ // Support: TestSwarm
+ // TestSwarm is now proxied via Cloudflare which cuts out
+ // headers relevant for ETag tests, failing them. We're still
+ // running those tests in Karma on Chrome & Firefox (including
+ // Firefox ESR).
+ qunitMethod: QUnit.isSwarm ? "skip" : "test"
+ }
},
- function( type, url ) {
- url = baseURL + url + "&ts=" + ifModifiedNow++;
- QUnit.test( "jQuery.ajax() - " + type + " support" + label, function( assert ) {
+ function( type, data ) {
+ var url = baseURL + data.url + "&ts=" + ifModifiedNow++;
+ QUnit[ data.qunitMethod ]( "jQuery.ajax() - " + type +
+ " support" + label, function( assert ) {
assert.expect( 4 );
var done = assert.async();
jQuery.ajax( {