Skip to content

Commit

Permalink
Add error output to ignite-new test as well
Browse files Browse the repository at this point in the history
  • Loading branch information
lindboe committed Sep 11, 2024
1 parent ff9c0ef commit 675ff0b
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions test/vanilla/ignite-new.test.ts
Original file line number Diff line number Diff line change
@@ -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()
Expand Down Expand Up @@ -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)
})
Expand Down

0 comments on commit 675ff0b

Please sign in to comment.