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

feat(testing): add .skip alias to bdd test API #3300

Merged
merged 1 commit into from
Apr 13, 2023

Conversation

marvinhagemeister
Copy link
Contributor

@marvinhagemeister marvinhagemeister commented Apr 2, 2023

This PR adds .skip() as an alias of .ignore(). That alias is much more common than .ignore() in popular bdd-style testing APIs in other test runners.

Test runner Skipping APIs
mocha describe.skip(), it.skip()
jasmine xdescribe(), xit()
jest describe.skip(), it.skip() or xdescribe(), xit()
vitest describe.skip(), it.skip()

@CLAassistant
Copy link

CLAassistant commented Apr 2, 2023

CLA assistant check
All committers have signed the CLA.

@marvinhagemeister marvinhagemeister marked this pull request as ready for review April 2, 2023 09:44
@kt3k
Copy link
Member

kt3k commented Apr 3, 2023

Adding .skip makes sense to me (.ignore looks exceptional on that design)

I don't think we should add xit or xdescribe. They are useful only when these keywords are all global variables (you can quickly switch between it <-> xit in that case). If those are exported via ES modules, you need to add import { xit } from ... before switching to xit (and also delete that import when you stop using it). So they are cumbersome to use and have little value in my view.

@marvinhagemeister
Copy link
Contributor Author

Fair point! I've updated the PR to only add .skip().

@marvinhagemeister marvinhagemeister changed the title feat(testing): add .skip and xit/xdescribe aliases to bdd test API feat(testing): add .skip alias to bdd test API Apr 3, 2023
Copy link
Member

@kt3k kt3k left a comment

Choose a reason for hiding this comment

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

LGTM

@kt3k kt3k merged commit c224ce4 into denoland:main Apr 13, 2023
@marvinhagemeister marvinhagemeister deleted the bdd-skip-alias branch April 13, 2023 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants