Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-akait committed Dec 25, 2020
2 parents 7bde804 + 05636b7 commit cec0cd8
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ that include your `webpack.config.js` and relevant files. This way you help othe

First of all, you will need to create an issue in Github for the feature or bugfix that you want to work on. When you open a new issue, there will be a template that will be automatically added to the text of the issue, which you would need to fill in. Doing this will help us to understand better what the ticket is about.

After you've created the issue, we will have a look, and provide feedback to your ticket.
After you've created an issue, we will have a look, and provide feedback to your ticket.

In case it is a bug that you want to fix, we might help you with background information about the issue, so you can make an informed fix.

Expand Down
27 changes: 27 additions & 0 deletions test/serve/basic/serve-basic.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,33 @@ describe('basic serve usage', () => {
expect(stdout).not.toContain('HotModuleReplacementPlugin');
});

it('should work with the "--mode" option', async () => {
const { stderr, stdout } = await runServe([], __dirname);

expect(stderr).toBeFalsy();
expect(stdout).toContain('development');
expect(stdout).toContain('main.js');
expect(stdout).not.toContain('HotModuleReplacementPlugin');
});

it('should work with the "--mode" option #2', async () => {
const { stderr, stdout } = await runServe(['--mode', 'production'], __dirname);

expect(stderr).toBeFalsy();
expect(stdout).toContain('production');
expect(stdout).toContain('main.js');
expect(stdout).not.toContain('HotModuleReplacementPlugin');
});

it('should work with the "--mode" option #2', async () => {
const { stderr, stdout } = await runServe(['--mode', 'development'], __dirname);

expect(stderr).toBeFalsy();
expect(stdout).toContain('development');
expect(stdout).toContain('main.js');
expect(stdout).not.toContain('HotModuleReplacementPlugin');
});

it('should work with flags', async () => {
const { stderr, stdout } = await runServe(['--hot'], __dirname);

Expand Down
2 changes: 1 addition & 1 deletion test/serve/basic/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin');
module.exports = {
mode: 'development',
devtool: false,
plugins: [new WebpackCLITestPlugin(['plugins'], false)],
plugins: [new WebpackCLITestPlugin(['mode', 'plugins'], false)],
};

0 comments on commit cec0cd8

Please sign in to comment.