Skip to content
This repository has been archived by the owner on Aug 5, 2020. It is now read-only.

Commit

Permalink
#406: Mock prompt for new.test.js which was causing Jest to be hanged…
Browse files Browse the repository at this point in the history
… up.
  • Loading branch information
ferrannp committed Jan 23, 2017
1 parent 14ec066 commit fb9b634
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/commands/new.test.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*global afterEach beforeEach describe it*/
import fs from "fs";
import temp from "temp";
import rimraf from "rimraf";
import glob from "glob";
import path from "path";
import newApp from "../../src/commands/new";
import logger from "../../src/lib/cliLogger";
import inquirer from "inquirer";

const newFilesTemplate = glob.sync("**", {
cwd: path.resolve("./templates/new"),
Expand All @@ -17,6 +17,7 @@ describe("cli: gluestick new", function () {
let originalCwd, tmpDir;
logger.info = jest.fn();
logger.warn = jest.fn();
inquirer.prompt = () => Promise.resolve({confirm: false});

beforeEach(() => {
originalCwd = process.cwd();
Expand Down

0 comments on commit fb9b634

Please sign in to comment.