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
Member

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

This comment has been minimized.

Copy link
Member 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

This comment has been minimized.

Copy link
Member 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

This comment has been minimized.

Copy link
Member

hueniverse commented Jul 16, 2014

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

This comment has been minimized.

Copy link
Member 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

This comment has been minimized.

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

This comment has been minimized.

Copy link
Member 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

This comment has been minimized.

Copy link
Member Author

Marsup commented Aug 3, 2014

@hueniverse Take that as a no ?

@hueniverse

This comment has been minimized.

Copy link
Member

hueniverse commented Aug 3, 2014

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
@rluba rluba mentioned this pull request Feb 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.