Skip to content

Commit d10b81a

Browse files
committed
Add error output to ignite-new test as well
1 parent 3679976 commit d10b81a

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

test/vanilla/ignite-new.test.ts

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { filesystem } from "gluegun"
22
import * as tempy from "tempy"
33
import { runIgnite, runError, run } from "../_test-helpers"
4+
import { stripANSI } from "../../src/tools/strip-ansi"
45

56
const APP_NAME = "Foo"
67
const originalDir = process.cwd()
@@ -31,10 +32,15 @@ describe("ignite new", () => {
3132
beforeAll(async () => {
3233
tempDir = tempy.directory({ prefix: "ignite-" })
3334

34-
result = await runIgnite(`new ${APP_NAME} --debug --packager=bun --yes`, {
35-
pre: `cd ${tempDir}`,
36-
post: `cd ${originalDir}`,
37-
})
35+
try {
36+
result = await runIgnite(`new ${APP_NAME} --debug --packager=bun --yes`, {
37+
pre: `cd ${tempDir}`,
38+
post: `cd ${originalDir}`,
39+
})
40+
} catch (e) {
41+
console.log("Ignite new output: \n", stripANSI(e.stdout))
42+
throw new Error("Ignite new failed")
43+
}
3844

3945
appPath = filesystem.path(tempDir, APP_NAME)
4046
})

0 commit comments

Comments
 (0)