Skip to content

tests(no-options): add no options test - #285

Merged
evenstensberg merged 2 commits into
webpack:masterfrom
dhruvdutt:tests/no-options
Mar 1, 2018
Merged

tests(no-options): add no options test#285
evenstensberg merged 2 commits into
webpack:masterfrom
dhruvdutt:tests/no-options

Conversation

@dhruvdutt

@dhruvdutt dhruvdutt commented Feb 25, 2018

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?
Test

Did you add tests for your changes?
Yes

Summary
Improve env complex test to check if env array gets created with correct values.

Does this PR introduce a breaking change?
No

Other information
Related #124, #254

@webpack-bot

Copy link
Copy Markdown

Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon.

@evenstensberg evenstensberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@fokusferit @ematipico have a look

expect(stdout[2]).toContain("Time: ");
expect(stdout[4]).toContain("");
expect(stdout[5]).toContain("WARNING");
expect(stdout[6]).toContain("The \'mode\' option has not been set");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The message should be The 'mode' option has not been set. Set 'mode' option to 'development' or 'production' to enable defaults for this environment.

I know it's passing but it would be better to show the whole message

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I had initially thought to keep the whole message but then I read the blog post that production is default mode so we will change the latter part of this message.

@ematipico ematipico left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM!

@evenstensberg evenstensberg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Test for all modes, output error log accordingly. Don't see any one touching dev/prod or none, just a general one

@webpack-bot

Copy link
Copy Markdown

@dhruvdutt Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@ev1stensberg Please review the new changes.

@dhruvdutt

Copy link
Copy Markdown
Contributor Author

@ev1stensberg Updated the tests to add modes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants