Skip to content
This repository has been archived by the owner on Jun 27, 2019. It is now read-only.

Add option to filter tests #177

Merged
merged 2 commits into from
Nov 6, 2017
Merged

Add option to filter tests #177

merged 2 commits into from
Nov 6, 2017

Conversation

FokkeZB
Copy link
Contributor

@FokkeZB FokkeZB commented Nov 6, 2017

Passes on --grep to mocha so that you can filter tests to run.

Copy link
Contributor

@BrunoBernardino BrunoBernardino left a comment

Choose a reason for hiding this comment

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

This looks great @FokkeZB ! Thank you so much for this.

I've added a question which I need to decide on whether this needs changes or can go as is.

@@ -38,6 +38,11 @@ const test = (context) => {
commands.push(`--timeout=${global.argOpts.timeout}`);
}

if (global.argOpts.grep) {
commands.push('--');
Copy link
Contributor

Choose a reason for hiding this comment

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

If global.argOpts.timeout is also set, I believe this will fail, right? If so, please add a condition here, otherwise, please ignore my comment.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Stuuuuupid mistake, fixed.

Copy link
Contributor

@BrunoBernardino BrunoBernardino left a comment

Choose a reason for hiding this comment

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

Thank you for this!

@FokkeZB FokkeZB merged commit 0b858d9 into master Nov 6, 2017
@FokkeZB FokkeZB deleted the test-grep branch November 6, 2017 19:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants