Skip to content

Commit

Permalink
Tests: Skip ETag AJAX tests on TestSwarm
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
mgol committed Dec 1, 2021
1 parent 7439e22 commit 81fa1e2
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions test/unit/ajax.js
Original file line number Diff line number Diff line change
Expand Up @@ -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( {
Expand Down

0 comments on commit 81fa1e2

Please sign in to comment.