diff --git a/test/binCases/config-name/found-many/test.opts b/test/binCases/config-name/found-many/test.opts index 6ce07911816..a2534c4c75c 100644 --- a/test/binCases/config-name/found-many/test.opts +++ b/test/binCases/config-name/found-many/test.opts @@ -4,4 +4,3 @@ --output-chunk-filename [id].chunk.js --target async-node --mode production - diff --git a/test/binCases/config-type/function-promise/test.opts b/test/binCases/config-type/function-promise/test.opts index bad08eb4c08..c05349648d1 100644 --- a/test/binCases/config-type/function-promise/test.opts +++ b/test/binCases/config-type/function-promise/test.opts @@ -1,3 +1,3 @@ --config ./webpack.config.js --target async-node ---mode production \ No newline at end of file +--mode production diff --git a/test/binCases/config-type/function/test.opts b/test/binCases/config-type/function/test.opts index bad08eb4c08..c05349648d1 100644 --- a/test/binCases/config-type/function/test.opts +++ b/test/binCases/config-type/function/test.opts @@ -1,3 +1,3 @@ --config ./webpack.config.js --target async-node ---mode production \ No newline at end of file +--mode production diff --git a/test/binCases/config-type/invalid-array/test.opts b/test/binCases/config-type/invalid-array/test.opts index bad08eb4c08..c05349648d1 100644 --- a/test/binCases/config-type/invalid-array/test.opts +++ b/test/binCases/config-type/invalid-array/test.opts @@ -1,3 +1,3 @@ --config ./webpack.config.js --target async-node ---mode production \ No newline at end of file +--mode production diff --git a/test/binCases/config-type/invalid-type/test.opts b/test/binCases/config-type/invalid-type/test.opts index bad08eb4c08..c05349648d1 100644 --- a/test/binCases/config-type/invalid-type/test.opts +++ b/test/binCases/config-type/invalid-type/test.opts @@ -1,3 +1,3 @@ --config ./webpack.config.js --target async-node ---mode production \ No newline at end of file +--mode production diff --git a/test/binCases/config-type/object/test.opts b/test/binCases/config-type/object/test.opts index bad08eb4c08..c05349648d1 100644 --- a/test/binCases/config-type/object/test.opts +++ b/test/binCases/config-type/object/test.opts @@ -1,3 +1,3 @@ --config ./webpack.config.js --target async-node ---mode production \ No newline at end of file +--mode production diff --git a/test/binCases/config-type/promise/test.opts b/test/binCases/config-type/promise/test.opts index bad08eb4c08..c05349648d1 100644 --- a/test/binCases/config-type/promise/test.opts +++ b/test/binCases/config-type/promise/test.opts @@ -1,3 +1,3 @@ --config ./webpack.config.js --target async-node ---mode production \ No newline at end of file +--mode production diff --git a/test/binCases/no-options/development/stdin.js b/test/binCases/no-options/development/stdin.js new file mode 100644 index 00000000000..d1a888c24cb --- /dev/null +++ b/test/binCases/no-options/development/stdin.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(2); + expect(stdout).toEqual(expect.anything()); + expect(stdout[0]).toContain("Hash: "); + expect(stdout[1]).toContain("Version: "); + expect(stdout[2]).toContain("Time: "); + expect(stdout[4]).toContain(""); + expect(stdout[5]).toContain("ERROR in Entry module not found"); + expect(stdout[6]).toContain(""); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/no-options/development/tests.opts b/test/binCases/no-options/development/tests.opts new file mode 100644 index 00000000000..7cf58ebbbc6 --- /dev/null +++ b/test/binCases/no-options/development/tests.opts @@ -0,0 +1 @@ +--mode development diff --git a/test/binCases/no-options/development/webpack.config.js b/test/binCases/no-options/development/webpack.config.js new file mode 100644 index 00000000000..f053ebf7976 --- /dev/null +++ b/test/binCases/no-options/development/webpack.config.js @@ -0,0 +1 @@ +module.exports = {}; diff --git a/test/binCases/no-options/none/stdin.js b/test/binCases/no-options/none/stdin.js new file mode 100644 index 00000000000..c44e364700a --- /dev/null +++ b/test/binCases/no-options/none/stdin.js @@ -0,0 +1,15 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(2); + expect(stdout).toEqual(expect.anything()); + expect(stdout[0]).toContain("Hash: "); + expect(stdout[1]).toContain("Version: "); + 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"); + expect(stdout[7]).toContain(""); + expect(stdout[8]).toContain("ERROR in Entry module not found"); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/no-options/none/test.opts b/test/binCases/no-options/none/test.opts new file mode 100644 index 00000000000..e69de29bb2d diff --git a/test/binCases/no-options/production/stdin.js b/test/binCases/no-options/production/stdin.js new file mode 100644 index 00000000000..d1a888c24cb --- /dev/null +++ b/test/binCases/no-options/production/stdin.js @@ -0,0 +1,13 @@ +"use strict"; + +module.exports = function testAssertions(code, stdout, stderr) { + expect(code).toBe(2); + expect(stdout).toEqual(expect.anything()); + expect(stdout[0]).toContain("Hash: "); + expect(stdout[1]).toContain("Version: "); + expect(stdout[2]).toContain("Time: "); + expect(stdout[4]).toContain(""); + expect(stdout[5]).toContain("ERROR in Entry module not found"); + expect(stdout[6]).toContain(""); + expect(stderr).toHaveLength(0); +}; diff --git a/test/binCases/no-options/production/tests.opts b/test/binCases/no-options/production/tests.opts new file mode 100644 index 00000000000..8fcb9db6edb --- /dev/null +++ b/test/binCases/no-options/production/tests.opts @@ -0,0 +1 @@ +--mode production diff --git a/test/binCases/no-options/production/webpack.config.js b/test/binCases/no-options/production/webpack.config.js new file mode 100644 index 00000000000..f053ebf7976 --- /dev/null +++ b/test/binCases/no-options/production/webpack.config.js @@ -0,0 +1 @@ +module.exports = {};