Files
reacord/packages/docs/scripts/test.ts
MapleLeaf d3f6c8af4d write test script for cypress
to properly kill the process
2022-01-11 00:25:12 -06:00

10 lines
292 B
TypeScript

import cypress from "cypress"
import { execa } from "execa"
import waitOn from "wait-on"
await execa("pnpm", ["build"], { stdio: "inherit" })
const app = execa("pnpm", ["start"], { stdio: "inherit" })
await waitOn({ resources: ["http-get://localhost:3000"] })
await cypress.run()
app.kill()