From f7bcaaab4966ffce0b92e2d4ef1004b682b407ba Mon Sep 17 00:00:00 2001 From: Brian Nguyen Date: Thu, 14 Jul 2022 09:18:24 +0700 Subject: [PATCH] tmp: logging Signed-off-by: Brian Nguyen --- commands/create-project-api.js | 1 + tests/create-api-project.js | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/commands/create-project-api.js b/commands/create-project-api.js index be1ed9d..8d3cfb4 100644 --- a/commands/create-project-api.js +++ b/commands/create-project-api.js @@ -162,6 +162,7 @@ async function addSampleDataPlugin(projectName) { Logger.info("Added the sample data plugin successfully."); return true; } catch (error) { + // eslint-disable-next-line no-console console.log(error); Logger.error(error); Logger.warn("Can't add the sample data plugin by error. Please add it manual."); diff --git a/tests/create-api-project.js b/tests/create-api-project.js index 82e6cc7..d4477e1 100644 --- a/tests/create-api-project.js +++ b/tests/create-api-project.js @@ -30,8 +30,9 @@ describe("The create-project-api command", () => { expect(responseLines[1]).to.equal("reaction-cli: Project creation complete. Change to your directory and run `npm install`"); }).timeout(5000); - it.only("should print the correct output when user run with --populate option", async () => { - console.log(123) + it("should print the correct output when user run with --populate option", async () => { + // eslint-disable-next-line no-console + console.log(123); const response = await execute("./index.js", ["create-project", "api", "myshop", "--populate"]); const responseLines = response.trim().split(EOL); expect(responseLines[1]).equal("reaction-cli: Added the sample data plugin successfully.");