aboutsummaryrefslogtreecommitdiffstats
path: root/build/tasks/build.js
diff options
context:
space:
mode:
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>2022-07-12 17:12:27 +0200
committerGitHub <noreply@github.com>2022-07-12 17:12:27 +0200
commitbc16512879bd81de9874bffa690404e14e8f43ff (patch)
treed6bda9401d77c87014b8d7574e56468541125cee /build/tasks/build.js
parent0f6c3d9efc5f7e844bdcf8ef44f9327f414bea77 (diff)
downloadjquery-bc16512879bd81de9874bffa690404e14e8f43ff.tar.gz
jquery-bc16512879bd81de9874bffa690404e14e8f43ff.zip
Tests: Exclude tests based on compilation flags, not API presence (3.x version)
Introduces a new test API, `includesModule`. The method returns whether a particular module like "ajax" or "deprecated" is included in the current jQuery build; it handles the slim build as well. The util was created so that we don't treat presence of particular APIs to decide whether to run a test as then if we accidentally remove an API, the tests would still not fail. Closes gh-5071 Fixes gh-5069 Ref gh-5046 (partially cherry picked from commit fae5fee8b435cc20352d28b0a384b9784b1ad9ed)
Diffstat (limited to 'build/tasks/build.js')
-rw-r--r--build/tasks/build.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/build/tasks/build.js b/build/tasks/build.js
index bdde74cee..71c20a81a 100644
--- a/build/tasks/build.js
+++ b/build/tasks/build.js
@@ -9,6 +9,7 @@
module.exports = function( grunt ) {
var fs = require( "fs" ),
requirejs = require( "requirejs" ),
+ slimBuildFlags = require( "./lib/slim-build-flags" ),
Insight = require( "insight" ),
pkg = require( "../../package.json" ),
srcFolder = __dirname + "/../../src/",
@@ -348,7 +349,7 @@ module.exports = function( grunt ) {
// the official slim build
.reduce( ( acc, elem ) => acc.concat(
elem === "slim" ?
- [ "-ajax", "-effects" ] :
+ slimBuildFlags :
[ elem ]
), [] )