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

Support for multiple formatters. #27

Merged
merged 2 commits into from
Feb 7, 2016
Merged

Support for multiple formatters. #27

merged 2 commits into from
Feb 7, 2016

Conversation

darrinholst
Copy link
Contributor

No description provided.

options.format = 'pretty';
}

var formats = util.isArray(options.format) ? options.format : [options.format];
Copy link
Owner

Choose a reason for hiding this comment

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

Seems like util.isArray is deprecated and should be replaced to Array.isArray now. https://nodejs.org/api/util.html#util_util_isarray_object

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was just following the existing code right below this dealing with multiple tags. I can update it if needed.

Copy link
Owner

Choose a reason for hiding this comment

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

yeah, that was because of someone's PR but please, take a look at this comment #27 (comment)

@vgamula
Copy link
Owner

vgamula commented Feb 7, 2016

Hi!

Seems like cucumber.js doesn't support multiple formatters https://github.com/cucumber/cucumber-js#formatters
I tried to run tests with two formatters options, like in your PR:

format: ['summary', 'json'],

Cucumber.js used the last one from the array.

@vgamula vgamula closed this Feb 7, 2016
@darrinholst
Copy link
Contributor Author

They have supported passing multiple formats since 0.8.0. This change is needed when you want to output json to a file when running in a ci environment and also display it to the console. We've been using it successfully this way since I opened the pr.

@vgamula vgamula reopened this Feb 7, 2016
@vgamula
Copy link
Owner

vgamula commented Feb 7, 2016

Oh, sorry for misunderstanding you and thanks for the explanation.
Could you please change utils.isArray to Array.isArray?
Then I merge it

vgamula added a commit that referenced this pull request Feb 7, 2016
Support for multiple formatters.
@vgamula vgamula merged commit 61bda28 into vgamula:master Feb 7, 2016
@vgamula
Copy link
Owner

vgamula commented Feb 7, 2016

Cool, thanks!

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.

None yet

2 participants