Skip to content

Commit

Permalink
cli(bugfix): Allow mode "none" in CLI (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
ematipico committed Apr 9, 2018
1 parent c487032 commit ab16b4f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bin/config-yargs.js
Expand Up @@ -88,7 +88,7 @@ module.exports = function(yargs) {
},
mode: {
type: "string",
choices: ["development", "production"],
choices: ["development", "production", "none"],
describe: "Mode to use",
group: CONFIG_GROUP,
requiresArg: true
Expand Down
1 change: 1 addition & 0 deletions test/binCases/mode/none/index.js
@@ -0,0 +1 @@
module.exports = "index";
9 changes: 9 additions & 0 deletions test/binCases/mode/none/stdin.js
@@ -0,0 +1,9 @@
"use strict";

module.exports = function testAssertions(code, stdout, stderr) {
expect(code).toBe(0);
expect(stdout).toEqual(expect.anything());
expect(stdout[5]).toContain("main.js");
expect(stdout[7]).toMatch(/index\.js.*\{0\}/);
expect(stderr).toHaveLength(0);
};
2 changes: 2 additions & 0 deletions test/binCases/mode/none/test.opts
@@ -0,0 +1,2 @@
./index.js
--mode none

0 comments on commit ab16b4f

Please sign in to comment.