Skip to content

Commit

Permalink
chore: prevent unnecessary writes to stdin (#2297)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 committed Jan 3, 2021
1 parent 0191ebc commit 41c391b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion test/init/force/init-force.test.js
Expand Up @@ -19,7 +19,7 @@ describe('init force flag', () => {
});

it('should scaffold webpack config', async () => {
const { stdout } = await runPromptWithAnswers(genPath, ['init', '--force'], [`N${ENTER}`, ENTER, ENTER, ENTER, ENTER, ENTER]);
const { stdout } = await runPromptWithAnswers(genPath, ['init', '--force'], [`N${ENTER}`, ENTER, ENTER, ENTER, ENTER]);

expect(stdout).toBeTruthy();
expect(stdout).toContain(firstPrompt);
Expand Down
2 changes: 1 addition & 1 deletion test/init/generator/init-inquirer.test.js
Expand Up @@ -19,7 +19,7 @@ describe('init', () => {
});

it('should scaffold when given answers', async () => {
const { stdout } = await runPromptWithAnswers(genPath, ['init'], [`N${ENTER}`, ENTER, ENTER, ENTER, ENTER, ENTER]);
const { stdout } = await runPromptWithAnswers(genPath, ['init'], [`N${ENTER}`, ENTER, ENTER, ENTER, ENTER]);

expect(stdout).toBeTruthy();
expect(stdout).toContain(firstPrompt);
Expand Down
6 changes: 1 addition & 5 deletions test/init/multipleEntries/init-multipleEntries.test.js
Expand Up @@ -16,11 +16,7 @@ describe('init with multiple entries', () => {
});

it('should scaffold with multiple entries', async () => {
const { stdout } = await runPromptWithAnswers(
genPath,
['init'],
[`Y${ENTER}`, `a, b${ENTER}`, ENTER, ENTER, ENTER, ENTER, ENTER, ENTER],
);
const { stdout } = await runPromptWithAnswers(genPath, ['init'], [`Y${ENTER}`, `a, b${ENTER}`, ENTER, ENTER, ENTER, ENTER, ENTER]);

expect(stdout).toBeTruthy();
expect(stdout).toContain(firstPrompt);
Expand Down

0 comments on commit 41c391b

Please sign in to comment.