]> source.dussan.org Git - jquery.git/commit
Tests: Exclude tests based on compilation flags, not API presence (3.x version)
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Tue, 12 Jul 2022 15:12:27 +0000 (17:12 +0200)
committerGitHub <noreply@github.com>
Tue, 12 Jul 2022 15:12:27 +0000 (17:12 +0200)
commitbc16512879bd81de9874bffa690404e14e8f43ff
treed6bda9401d77c87014b8d7574e56468541125cee
parent0f6c3d9efc5f7e844bdcf8ef44f9327f414bea77
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)
24 files changed:
build/tasks/build.js
build/tasks/lib/slim-build-flags.js [new file with mode: 0644]
test/.eslintrc.json
test/data/testinit-jsdom.js
test/data/testinit.js
test/unit/ajax.js
test/unit/animation.js
test/unit/attributes.js
test/unit/basic.js
test/unit/callbacks.js
test/unit/core.js
test/unit/css.js
test/unit/deferred.js
test/unit/deprecated.js
test/unit/dimensions.js
test/unit/effects.js
test/unit/manipulation.js
test/unit/offset.js
test/unit/queue.js
test/unit/ready.js
test/unit/serialize.js
test/unit/support.js
test/unit/tween.js
test/unit/wrap.js