Skip to content

Commit 81fa1e2

Browse files
committed
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 00c060d)
1 parent 7439e22 commit 81fa1e2

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

test/unit/ajax.js

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1557,12 +1557,25 @@ QUnit.module( "ajax", {
15571557
function( label, cache ) {
15581558
jQuery.each(
15591559
{
1560-
"If-Modified-Since": "mock.php?action=ims",
1561-
"Etag": "mock.php?action=etag"
1560+
"If-Modified-Since": {
1561+
url: "mock.php?action=ims",
1562+
qunitMethod: "test"
1563+
},
1564+
"Etag": {
1565+
url: "mock.php?action=etag",
1566+
1567+
// Support: TestSwarm
1568+
// TestSwarm is now proxied via Cloudflare which cuts out
1569+
// headers relevant for ETag tests, failing them. We're still
1570+
// running those tests in Karma on Chrome & Firefox (including
1571+
// Firefox ESR).
1572+
qunitMethod: QUnit.isSwarm ? "skip" : "test"
1573+
}
15621574
},
1563-
function( type, url ) {
1564-
url = baseURL + url + "&ts=" + ifModifiedNow++;
1565-
QUnit.test( "jQuery.ajax() - " + type + " support" + label, function( assert ) {
1575+
function( type, data ) {
1576+
var url = baseURL + data.url + "&ts=" + ifModifiedNow++;
1577+
QUnit[ data.qunitMethod ]( "jQuery.ajax() - " + type +
1578+
" support" + label, function( assert ) {
15661579
assert.expect( 4 );
15671580
var done = assert.async();
15681581
jQuery.ajax( {

0 commit comments

Comments
 (0)