Skip to content

Tests: Exclude tests based on compilation flags, not API presence #5046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

mgol
Copy link
Member

@mgol mgol commented May 23, 2022

Summary

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

Checklist

Sorry, something went wrong.

@mgol mgol added this to the 4.0.0 milestone May 23, 2022
@mgol mgol self-assigned this May 23, 2022
@mgol mgol force-pushed the test-includesModule branch 2 times, most recently from 9f7468a to eec6f01 Compare May 23, 2022 16:17
Copy link
Member

@timmywil timmywil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good improvement

@mgol mgol removed the Needs review label Jun 27, 2022
@mgol mgol force-pushed the test-includesModule branch from eec6f01 to 55549a6 Compare June 28, 2022 09:59
mgol added a commit to mgol/jquery that referenced this pull request Jun 28, 2022
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 jquerygh-5069
Closes jquerygh-5046
@mgol mgol force-pushed the test-includesModule branch from 55549a6 to 9ac0ef2 Compare June 28, 2022 10:02
mgol added a commit to mgol/jquery that referenced this pull request Jun 28, 2022
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 jquerygh-5069
Closes jquerygh-5046
@mgol mgol force-pushed the test-includesModule branch from 9ac0ef2 to 39e7692 Compare June 28, 2022 10:09
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 jquerygh-5069
Closes jquerygh-5046
@mgol mgol force-pushed the test-includesModule branch from 39e7692 to 7b30faf Compare June 28, 2022 10:31
@mgol mgol merged commit fae5fee into jquery:main Jun 28, 2022
@mgol mgol deleted the test-includesModule branch June 28, 2022 10:39
mgol added a commit to mgol/jquery that referenced this pull request Jun 28, 2022
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 jquerygh-5069
Ref jquerygh-5046

(partially cherry picked from commit fae5fee)
mgol added a commit to mgol/jquery that referenced this pull request Jun 28, 2022
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 jquerygh-5069
Ref jquerygh-5046

(partially cherry picked from commit fae5fee)
mgol added a commit to mgol/jquery that referenced this pull request Jun 28, 2022
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 jquerygh-5069
Ref jquerygh-5046

(partially cherry picked from commit fae5fee)
mgol added a commit that referenced this pull request Jul 12, 2022
…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 fae5fee)
hossain-khan added a commit to hossain-khan/github-stats that referenced this pull request Sep 23, 2022
Now prints

```
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PR: Tests: Exclude tests based on compilation flags, not API presence (jquery/jquery#5046)
PR Available: May 23, 2022, 12:02:33 PM
Review Time: {timmywil=35d 0h 25m 43s}
PR Merged in: 35d 18h 36m 29s on Jun 28, 2022, 6:39:02 AM
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
```
mgol added a commit to mgol/jquery that referenced this pull request Jan 11, 2023
PR jquerygh-5046 erroneously changed AJAX deprecated event alias
usage in deprecated tests to `.on()` calls. This change
reverses this mistake.
mgol added a commit that referenced this pull request Mar 15, 2023
PR gh-5046 erroneously changed AJAX deprecated event alias
usage in deprecated tests to `.on()` calls. This change
reverses this mistake.

Closes gh-5195
Ref gh-5046
mgol added a commit that referenced this pull request Mar 15, 2023
PR gh-5046 erroneously changed AJAX deprecated event alias
usage in deprecated tests to `.on()` calls. This change
reverses this mistake.

Closes gh-5195
Ref gh-5046

(cherry picked from commit cff2899)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Tests: Exclude tests based on compilation flags, not API presence
2 participants