Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Allow passing only to suites with skip lists #321

Merged
merged 1 commit into from
Jul 3, 2018

Conversation

travisperson
Copy link
Contributor

If a suite of tests has a skip array, when adding a only: true, the skipped tests start to run again, which makes it hard to isolate a suite. This change allows skipped tests to be skipped and not have the only applied. This results in the tests not showing up in the output.

Example

  tests.key(defaultCommonFactory, {
    only: true,
    skip: [
      // key.export
      {
        name: 'export',
        reason: 'TODO not implemented in go-ipfs yet'
      },
      // key.import
      {
        name: 'import',
        reason: 'TODO not implemented in go-ipfs yet'
      }
    ]
  })

Output

Before

  interface-ipfs-core tests
    .key.gen
      ✓ should generate a new rsa key (106ms)
    .key.list
      ✓ should list all the keys (246ms)
    .key.rename
      ✓ should rename a key (156ms)
    .key.rm
      ✓ should rm a key (178ms)
    .key.export
      1) should export "self" key
    .key.import
      2) should import an exported key


  4 passing (3s)
  2 failing

After

  interface-ipfs-core tests
    .key.gen
      ✓ should generate a new rsa key (175ms)
    .key.list
      ✓ should list all the keys (182ms)
    .key.rename
      ✓ should rename a key (207ms)
    .key.rm
      ✓ should rm a key (97ms)

  4 passing (2s)

License: MIT
Signed-off-by: Travis Person <travis@protocol.ai>
@ghost ghost assigned travisperson Jul 2, 2018
@ghost ghost added the in progress label Jul 2, 2018
Copy link
Contributor

@alanshaw alanshaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@alanshaw alanshaw merged commit c47c4ce into master Jul 3, 2018
@ghost ghost removed the in progress label Jul 3, 2018
@alanshaw alanshaw deleted the allow-only-when-skipping branch July 3, 2018 08:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants