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

test grouping, only/skip for nested #273

Closed
wclr opened this issue Mar 20, 2016 · 2 comments
Closed

test grouping, only/skip for nested #273

wclr opened this issue Mar 20, 2016 · 2 comments

Comments

@wclr
Copy link

wclr commented Mar 20, 2016

I organize my tests in folloing way:

tape('setup', t => {
//.. test setup steps
})
// then test it sef co
tape('test1', t => {

})
tape.skip('test2', t => {
  t.test.skip(...) // not supported
  t.test.only(...) // not supported
})
tape('the end', t => {
  t.end()
})

Two problems i see here:

  1. Nested test do not suport skip/only
  2. Not sure is there a better way of test grouping, do recommend to use a big nested test?
  3. Run only test if I whant to do this I would need to put .only on setup (maybe the end) as well wich seem a little bit inconvinient.
@ljharb
Copy link
Collaborator

ljharb commented Mar 20, 2016

  1. t.test(…, { skip: true }, …)
  2. nesting, or, separate files, are the best way to group
  3. t.test(…, { only: true }, …) should work for you

t.test.skip and t.test.only are impossible without using ES5 accessors, which are slow, bad practice, and would make this lib incompatible with ES3 environments.

@wclr
Copy link
Author

wclr commented Mar 20, 2016

Ok, thanks) closing

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

No branches or pull requests

2 participants