Skip to content

"Only" option #10

Open
Open

Description

@philcockfield

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.

Activity

  1. rbabayoff commented on Jul 6, 2014

    @rbabayoff
    Member

    Phil, agreed. Go ahead and take a look at it. We'll merge it.
    On Jul 5, 2014 5:35 PM, "Phil Cockfield" notifications@github.com 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.

  2. rbabayoff commented on Aug 22, 2014

    @rbabayoff
    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.

  3. marcodejongh commented on Oct 15, 2014

    @marcodejongh

    +1

  4. DominikGuzei commented on Oct 15, 2014

    @DominikGuzei
    Contributor

    👍

  5. DominikGuzei commented on Oct 15, 2014

    @DominikGuzei
    Contributor

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

  6. robot-lavaina commented on Oct 15, 2014

    @robot-lavaina

    In browser? Doesn't exist.

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

    On Wed, Oct 15, 2014 at 7:21 PM, Dominik Guzei notifications@github.com
    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)
    .

  7. robot-lavaina commented on Oct 15, 2014

    @robot-lavaina

    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions