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

Provide QUnit.test aliases for only/todo/skip #1496

Merged
merged 2 commits into from
Nov 7, 2020

Conversation

smcclure15
Copy link
Member

@smcclure15 smcclure15 commented Nov 6, 2020

Fixes #1402

QUnit.test.only === QUnit.only
QUnit.test.todo === QUnit.todo
QUnit.test.skip === QUnit.skip

#1402 called out these QUnit.test variants as aliases to the main QUnit functions, but to keep the code modular, I reversed that in the implementation to make the main QUnit functions aliases to the test implementations. Those are really the "shortcuts" at that level, and Test holds onto the real implementations (as it always had). These methods are now encapsulated and exposed only through the Test function/object, no longer as exported functions.

Our existing tests still use the main QUnit methods, which I think is perfectly valid.

I doc'ed these new aliases in Test.md, pointing to the existing main QUnit methods. I did not touch the main only/todo/skip docs to point to anything about these new aliases, but I could add a "Changelog" section in each to mention these? I didn't want to clutter.

QUnit.test.only === QUnit.only
QUnit.test.todo === QUnit.todo
QUnit.test.skip === QUnit.skip
Included aliases in test.md, pointing to QUnit main docs
@smcclure15
Copy link
Member Author

Hmm, got a failure in "CLI Watch > properly watches files after initial run", only on Mac/Node10. Looks unrelated.
I've seen that before on a different change, maybe a flaky test...?

@Krinkle
Copy link
Member

Krinkle commented Nov 7, 2020

Hmm, got a failure in "CLI Watch > properly watches files after initial run", only on Mac/Node10. Looks unrelated.
I've seen that before on a different change, maybe a flaky test...?

Yeah, it started happening a few weeks ago. Possibly due to a change in Node.js or in Travis' Mac systems. I've re-run those builds, and they pass now.

@Krinkle Krinkle merged commit d1c2c39 into qunitjs:master Nov 7, 2020
@smcclure15 smcclure15 deleted the test-aliases branch November 9, 2020 14:06
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.

Add QUnit.test.only as alias for QUnit.only (and QUnit.test.todo, QUnit.test.skip)
2 participants