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

Pass --grep arg to mocha #15

Merged
merged 1 commit into from
Mar 29, 2016
Merged

Pass --grep arg to mocha #15

merged 1 commit into from
Mar 29, 2016

Conversation

SwinX
Copy link
Contributor

@SwinX SwinX commented Mar 28, 2016

Grep string is being passed directly to mocha, mocha will convert it to regexp by itself.

@SwinX SwinX self-assigned this Mar 28, 2016
@SwinX
Copy link
Contributor Author

SwinX commented Mar 28, 2016

/cc @sipayRT @j0tunn

@@ -28,6 +28,8 @@ module.exports = inherit({
opts.retry = opts.retry || config.retry;
});

config.mochaOpts.grep = config.grep;
Copy link
Contributor

Choose a reason for hiding this comment

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

mochaOpts может быть не объектом?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Там выше конфиг и переданные опции мержатся с опциями по умолчанию, там mochaOpts всегда будут определяться.

Copy link
Contributor

Choose a reason for hiding this comment

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

ага, спасибо.

@j0tunn
Copy link
Contributor

j0tunn commented Mar 29, 2016

Доку бы дописать

@SwinX
Copy link
Contributor Author

SwinX commented Mar 29, 2016

🆙

@j0tunn
Copy link
Contributor

j0tunn commented Mar 29, 2016

🆗 А как регексп передать? --grep '/^asdf$/'?

@SwinX
Copy link
Contributor Author

SwinX commented Mar 29, 2016

У меня работало что-то типо hermione --grep ч/б$, то-есть русские + управляющие символы

@SwinX SwinX merged commit f1b01a4 into master Mar 29, 2016
@SwinX SwinX deleted the feature/grep branch March 30, 2016 10:35
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

Successfully merging this pull request may close these issues.

3 participants