From 675ff0be7b5ec002b194b9cd58c08ef2587420e3 Mon Sep 17 00:00:00 2001 From: Lizzi Lindboe Date: Wed, 11 Sep 2024 16:06:11 -0700 Subject: [PATCH] Add error output to ignite-new test as well --- test/vanilla/ignite-new.test.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/test/vanilla/ignite-new.test.ts b/test/vanilla/ignite-new.test.ts index e39064f01..0273c1b52 100644 --- a/test/vanilla/ignite-new.test.ts +++ b/test/vanilla/ignite-new.test.ts @@ -1,6 +1,7 @@ import { filesystem } from "gluegun" import * as tempy from "tempy" import { runIgnite, runError, run } from "../_test-helpers" +import { stripANSI } from "../../src/tools/strip-ansi" const APP_NAME = "Foo" const originalDir = process.cwd() @@ -31,10 +32,15 @@ describe("ignite new", () => { beforeAll(async () => { tempDir = tempy.directory({ prefix: "ignite-" }) - result = await runIgnite(`new ${APP_NAME} --debug --packager=bun --yes`, { - pre: `cd ${tempDir}`, - post: `cd ${originalDir}`, - }) + try { + result = await runIgnite(`new ${APP_NAME} --debug --packager=bun --yes`, { + pre: `cd ${tempDir}`, + post: `cd ${originalDir}`, + }) + } catch (e) { + console.log("Ignite new output: \n", stripANSI(e.stdout)) + throw new Error("Ignite new failed") + } appPath = filesystem.path(tempDir, APP_NAME) })