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

Add support for plugin config #13

Merged
merged 2 commits into from
Jul 6, 2018
Merged

Add support for plugin config #13

merged 2 commits into from
Jul 6, 2018

Conversation

rogeliog
Copy link
Member

@rogeliog rogeliog commented Jul 3, 2018

Depends on jestjs/jest#6603

@SimenB
Copy link
Member

SimenB commented Jul 4, 2018

Available in Jest 23.3.0, so should be good to go 🙂


constructor({
stdin,
stdout,
config,
Copy link
Member

Choose a reason for hiding this comment

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

should have a default value

@@ -48,8 +57,8 @@ class FileNamePlugin {
// eslint-disable-next-line class-methods-use-this
getUsageInfo() {
return {
key: 'p',
prompt: 'filter by a filename regex pattern',
key: this._config.key || 'p',
Copy link
Member

Choose a reason for hiding this comment

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

check in constructor and assign there?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds like a good idea? Do you mean assigning the this._key and this._prompt as instance variables?

Copy link
Member

Choose a reason for hiding this comment

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

Yes 🙂

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