Skip to content

Commit cec0cd8

Browse files
Merge remote-tracking branch 'origin/master'
2 parents 7bde804 + 05636b7 commit cec0cd8

File tree

3 files changed

+29
-2
lines changed

3 files changed

+29
-2
lines changed

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ that include your `webpack.config.js` and relevant files. This way you help othe
4848

4949
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.
5050

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

5353
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.
5454

test/serve/basic/serve-basic.test.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,33 @@ describe('basic serve usage', () => {
3434
expect(stdout).not.toContain('HotModuleReplacementPlugin');
3535
});
3636

37+
it('should work with the "--mode" option', async () => {
38+
const { stderr, stdout } = await runServe([], __dirname);
39+
40+
expect(stderr).toBeFalsy();
41+
expect(stdout).toContain('development');
42+
expect(stdout).toContain('main.js');
43+
expect(stdout).not.toContain('HotModuleReplacementPlugin');
44+
});
45+
46+
it('should work with the "--mode" option #2', async () => {
47+
const { stderr, stdout } = await runServe(['--mode', 'production'], __dirname);
48+
49+
expect(stderr).toBeFalsy();
50+
expect(stdout).toContain('production');
51+
expect(stdout).toContain('main.js');
52+
expect(stdout).not.toContain('HotModuleReplacementPlugin');
53+
});
54+
55+
it('should work with the "--mode" option #2', async () => {
56+
const { stderr, stdout } = await runServe(['--mode', 'development'], __dirname);
57+
58+
expect(stderr).toBeFalsy();
59+
expect(stdout).toContain('development');
60+
expect(stdout).toContain('main.js');
61+
expect(stdout).not.toContain('HotModuleReplacementPlugin');
62+
});
63+
3764
it('should work with flags', async () => {
3865
const { stderr, stdout } = await runServe(['--hot'], __dirname);
3966

test/serve/basic/webpack.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ const WebpackCLITestPlugin = require('../../utils/webpack-cli-test-plugin');
33
module.exports = {
44
mode: 'development',
55
devtool: false,
6-
plugins: [new WebpackCLITestPlugin(['plugins'], false)],
6+
plugins: [new WebpackCLITestPlugin(['mode', 'plugins'], false)],
77
};

0 commit comments

Comments
 (0)