try to kill detached process

This commit is contained in:
MapleLeaf
2022-01-10 23:37:09 -06:00
parent d9dd4d5307
commit b65004dd75

View File

@@ -3,7 +3,7 @@ import { execa } from "execa"
import waitOn from "wait-on"
await execa("pnpm", ["build"], { stdio: "inherit" })
const app = execa("pnpm", ["start"], { stdio: "inherit" })
const app = execa("pnpm", ["start"], { stdio: "inherit", detached: true })
await waitOn({ resources: ["http-get://localhost:3000"] })
await cypress.run()
app.kill("SIGKILL")
process.kill(app.pid!)