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

"Only" option #10

Open
philcockfield opened this issue Jul 5, 2014 · 7 comments
Open

"Only" option #10

philcockfield opened this issue Jul 5, 2014 · 7 comments

Comments

@philcockfield
Copy link
Contributor

I don't think there is a concept of only on an munit suite, is there? Eg:

mySuite =
    name: "My Suite"
    only: true # Of all suites registered, only this one will run

or

mySuite =
    name: "My Suite"
    tests:
        'my test':
             func: (test): ->
             only: true # Only this test will run

This is a concept from Mocha, that if we had it on the raw Munit suites/tests we could put it on the BDD describe / it semantics.

Want me to take a look at this? Or would that be easy for you to bang out seeing you've got you're heads around the MUnit class.

To do one better than Mocha, it's would be really important to be cumulative around only filters. This allows you to narrow in on say 2 relevant tests that you're working on. Mocha just finds the first match of .only and runs that, which is super annoying.

@rbabayoff
Copy link
Member

Phil, agreed. Go ahead and take a look at it. We'll merge it.
On Jul 5, 2014 5:35 PM, "Phil Cockfield" [email protected] wrote:

I don't think there is a concept of only on an munit suite, is there? Eg:

mySuite =
name: "My Suite"
only: true # Of all suites registered, only this one will run

or

mySuite =
name: "My Suite"
tests:
'my test':
func: (test): ->
only: true # Only this test will run

This is a concept from Mocha, that if we had it on the raw Munit
suites/tests we could put it on the BDD describe / it semantics.

Want me to take a look at this? Or would that be easy for you to bang out
seeing you've got you're heads around the MUnit class.

To do one better than Mocha, it's would be really important to be
cumulative around only filters. This allows you to narrow in on say 2
relevant tests that you're working on. Mocha just finds the first match of
.only and runs that, which is super annoying.


Reply to this email directly or view it on GitHub
#10.

@rbabayoff
Copy link
Member

The way this can be implemented easily is to create a separate test bag for only tests and if it's not empty at the end of adding all test suites, run that test bag, instead of the all test bag. Let me know if you're working on it, if not, we'll do it once we have time.

@marcodejongh
Copy link

+1

1 similar comment
@DominikGuzei
Copy link
Contributor

👍

@DominikGuzei
Copy link
Contributor

By the way, does anybody know a way to tell tinytest only to show failed tests?

@robot-lavaina
Copy link

In browser? Doesn't exist.

Ronen Babayoff
Mobile: +1-809-889-4444

On Wed, Oct 15, 2014 at 7:21 PM, Dominik Guzei [email protected]
wrote:

By the way, does anybody know a way to tell tinytest only to show failed
tests?


Reply to this email directly or view it on GitHub
#10 (comment)
.

@robot-lavaina
Copy link

But you can create your own test-in-browser package and support that. This
is what meteor uses when you run meteor test-packages. Source:

https://github.com/meteor/meteor/tree/devel/packages/test-in-browser

And then, to use your published package:

meteor test-packages --driver-package my:test-in-browser

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants