]> source.dussan.org Git - jquery.git/commit
Tests: Exclude tests based on compilation flags, not API presence
authorMichał Gołębiowski-Owczarek <m.goleb@gmail.com>
Tue, 28 Jun 2022 10:39:01 +0000 (12:39 +0200)
committerGitHub <noreply@github.com>
Tue, 28 Jun 2022 10:39:01 +0000 (12:39 +0200)
commitfae5fee8b435cc20352d28b0a384b9784b1ad9ed
tree86ae9425c469a476c25ce62399297d35472dbc2c
parent52f452b2e8881e5ec5c9e880e277c8ecf633e8dc
Tests: Exclude tests based on compilation flags, not API presence

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.

Fixes gh-5069
Closes gh-5046
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