Skip to content
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

Core: correct flat module.only usage by marking currentModule as ignored #1658

Merged
merged 1 commit into from
Sep 18, 2021

Conversation

smcclure15
Copy link
Member

Resolves #1645.

The first time we process a module.only call, we chop the list of tests that have accumulated so far, and then mark everything after that as an early-return to not even process it. But there's the edge-case where we're currently within a nested module, which might add more tests as "siblings" to that module.only usage. By forcefully marking the currentTest as ignored, we are sure to accurately filter other trailing cases.

Added a unittest by squeezing in a new test case to a prior test for module.only. That is admittedly growing in complexity, but I think still serves as a great integration-level test to really stress the combinations.

@smcclure15 smcclure15 changed the title Core: correct flat module.only usage by currentModule as ignored Core: correct flat module.only usage by marking currentModule as ignored Sep 17, 2021
@Krinkle
Copy link
Member

Krinkle commented Sep 18, 2021

He, I was just working on the same patch. Same src fix, different test. I'll submit mine after this.

@Krinkle Krinkle merged commit e0aa69a into qunitjs:main Sep 18, 2021
Krinkle added a commit to Krinkle/qunit that referenced this pull request Sep 18, 2021
Krinkle added a commit that referenced this pull request Sep 18, 2021
@smcclure15 smcclure15 deleted the fix-flat-module-only branch September 20, 2021 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

QUnit.module.only including sibling tests when used in the middle of a set
2 participants