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

Add describe.skip/only and it.skip/only #116

Closed
wants to merge 3 commits into from

Conversation

Marsup
Copy link
Contributor

@Marsup Marsup commented Jul 15, 2014

skip is only a wrapper around the already existing skip option, nothing much to say here.

only is more tricky, so feel free to review commits separately.
I've tried to be the least intrusive but I'm not sure you'll like me hooking onto the Lab object.
Anyway I went for a cleanup of the testing tree before running the tests because it feels like what we would want (as opposed to dozens of tests marked as skipped).

I hope that's more or less what you would have done.

Closes #110

@Marsup
Copy link
Contributor Author

Marsup commented Jul 15, 2014

By the way, that cleanup also has another reason : it guarantees only the before/after/... necessary to run the experiment/test (even with nesting) will run.

@Marsup
Copy link
Contributor Author

Marsup commented Jul 16, 2014

Actually I thought of another way which is that last commit, it relies more on the experiments/tests options and doesn't clean the tree anymore. It might be closer to what the project is currently doing. I let you pick the best approach (if any :)).

@hueniverse
Copy link
Contributor

Other than feature parity with mocha (which I don't care about), what's the point of this? I can see how *.skip() is easier syntax, but what is only() good for?!

@Marsup
Copy link
Contributor Author

Marsup commented Jul 16, 2014

I've spent weeks working with the existing grep feature, and it's so not user friendly. As said in the original issue, it will ease working with watchers as you don't have to modify your configuration every time you want to focus on a test.

Grep also relies on strings which sometimes conflict, and it also executes unnecessary before/after but that might be a bug.

I really find it more efficient, less going around in different files to reconfigure your tests for such occasions where you need it.

@geek
Copy link
Member

geek commented Aug 1, 2014

It may not fill the need for only or skip but how far will the new test identifier format get you? (https://github.com/spumko/lab/blob/master/lib/cli.js#L227)

for example

lab -i 3-5,7-10

or

lab -i 2,3,5

@Marsup
Copy link
Contributor Author

Marsup commented Aug 2, 2014

For me, the main goal of only/skip is to avoid context switching, restarting watchers, etc...
The result is the same, the way to do it is not, and also it probably doesn't work on describe, right ?

@hueniverse hueniverse changed the title Fixes #110 - add describe.skip/only and it.skip/only Add describe.skip/only and it.skip/only Aug 3, 2014
@hueniverse hueniverse closed this Aug 3, 2014
@Marsup
Copy link
Contributor Author

Marsup commented Aug 3, 2014

@hueniverse Take that as a no ?

@hueniverse
Copy link
Contributor

Take that as I'll do it my own way... :-)

@hueniverse hueniverse added this to the 4.0.0 milestone Aug 3, 2014
@hueniverse hueniverse self-assigned this Aug 3, 2014
@Marsup Marsup mentioned this pull request Aug 14, 2014
@rluba rluba mentioned this pull request Feb 24, 2016
@lock
Copy link

lock bot commented Jan 9, 2020

This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature New functionality or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lab.test.only and Lab.test.skip
3 participants