Skip to content

Commit 5dde3ee

Browse files
Updated tests to reflect a new message that Inquirer prints when isTTY is false
1 parent 6b47422 commit 5dde3ee

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

.vscode/launch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"--timeout=60000",
2222
"--retries=0",
2323
],
24-
// "console": "integratedTerminal",
24+
"console": "integratedTerminal",
2525
"outFiles": [
2626
"${workspaceFolder}/lib/**/*.js"
2727
],

package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"detect-indent": "^6.0.0",
7676
"detect-newline": "^3.1.0",
7777
"globby": "^11.0.0",
78-
"inquirer": "^7.0.1",
78+
"inquirer": "^7.0.6",
7979
"log-symbols": "^3.0.0",
8080
"semver": "^7.1.1"
8181
},

test/specs/cli.spec.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,11 @@ describe("bump", () => {
1212

1313
// Run the CLI without any arguments.
1414
// It will prompt the user and wait forever, so add a timeout.
15-
let cli = bump("", { timeout: 6000 });
15+
let cli = bump("");
1616

17-
// It should have prompted for input
18-
expect(cli.stdout).to.contain("The current version in package.json is 1.0.0\nHow would you like to bump it? (Use arrow keys)");
17+
expect(cli).to.have.exitCode(1);
18+
expect(cli).to.have.stdout("");
19+
expect(cli).to.have.stderr("Prompts can not be meaningfully rendered in non-TTY environments\n");
1920
});
2021

2122
it("should error if an invalid argument is used", () => {

0 commit comments

Comments
 (0)