🌐 AI搜索 & 代理 主页
Skip to content

Commit 3c7dcb0

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).
1 parent e23190e commit 3c7dcb0

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
@@ -1634,12 +1634,25 @@ QUnit.module( "ajax", {
16341634
function( label, cache ) {
16351635
jQuery.each(
16361636
{
1637-
"If-Modified-Since": "mock.php?action=ims",
1638-
"Etag": "mock.php?action=etag"
1637+
"If-Modified-Since": {
1638+
url: "mock.php?action=ims",
1639+
qunitMethod: "test"
1640+
},
1641+
"Etag": {
1642+
url: "mock.php?action=etag",
1643+
1644+
// Support: TestSwarm
1645+
// TestSwarm is now proxied via Cloudflare which cuts out
1646+
// headers relevant for ETag tests, failing them. We're still
1647+
// running those tests in Karma on Chrome & Firefox (including
1648+
// Firefox ESR).
1649+
qunitMethod: QUnit.isSwarm ? "skip" : "test"
1650+
}
16391651
},
1640-
function( type, url ) {
1641-
url = baseURL + url + "&ts=" + ifModifiedNow++;
1642-
QUnit.test( "jQuery.ajax() - " + type + " support" + label, function( assert ) {
1652+
function( type, data ) {
1653+
var url = baseURL + data.url + "&ts=" + ifModifiedNow++;
1654+
QUnit[ data.qunitMethod ]( "jQuery.ajax() - " + type +
1655+
" support" + label, function( assert ) {
16431656
assert.expect( 4 );
16441657
var done = assert.async();
16451658
jQuery.ajax( {

0 commit comments

Comments
 (0)