aboutsummaryrefslogtreecommitdiffstats
path: root/test/unit/support.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2020-01-27 18:54:47 +0100
committerGitHub <noreply@github.com>2020-01-27 18:54:47 +0100
commitd525ae3416417186330bb3d14133df84509803a0 (patch)
tree7f6920f6228a5d8934f539abba28f8f8ed756191 /test/unit/support.js
parent7a3cf9c03cc34d5493383852f94d96fe4a3486ef (diff)
downloadjquery-d525ae3416417186330bb3d14133df84509803a0.tar.gz
jquery-d525ae3416417186330bb3d14133df84509803a0.zip
Build:Tests: Fix custom build tests, verify on Travis; name Travis jobs
This commit fixes unit tests for the following builds: 1. The no-deprecated build: `custom:-deprecated` 2. The current slim build: `custom:-ajax,-effects` 3. The 4.0 (#4553) slim build: `custom:-ajax,-callbacks,-deferred,-effects` It also adds separate Travis jobs for the no-deprecated & slim builds. Apart from that, add intuitive names to Travis jobs. Otherwise it's hard to see at a glance that a particular job is running on Firefox ESR, for example. Ref gh-4577 Ref gh-4596 Closes gh-4600
Diffstat (limited to 'test/unit/support.js')
-rw-r--r--test/unit/support.js10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/unit/support.js b/test/unit/support.js
index d7de8ac5c..e293c7423 100644
--- a/test/unit/support.js
+++ b/test/unit/support.js
@@ -55,7 +55,7 @@ testIframe(
);
( function() {
- var expected,
+ var browserKey, expected,
userAgent = window.navigator.userAgent,
expectedMap = {
edge: {
@@ -294,6 +294,14 @@ testIframe(
}
};
+ // Make the slim build pass tests.
+ for ( browserKey in expectedMap ) {
+ if ( !jQuery.ajax ) {
+ delete expectedMap[ browserKey ].ajax;
+ delete expectedMap[ browserKey ].cors;
+ }
+ }
+
if ( /edge\//i.test( userAgent ) ) {
expected = expectedMap.edge;
} else if ( /(msie 10\.0|trident\/7\.0)/i.test( userAgent ) ) {