Skip to content

Commit 71cdbb3

Browse files
committed
fix
1 parent 62bea6b commit 71cdbb3

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

init/src/init_test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ Deno.test("init - can start dev server", async () => {
176176
await patchProject(dir);
177177
await withChildProcessServer(
178178
dir,
179-
path.join(dir, "dev.ts"),
179+
["run", "-A", path.join(dir, "dev.ts")],
180180
async (address) => {
181181
await withBrowser(async (page) => {
182182
await page.goto(address);
@@ -210,7 +210,7 @@ Deno.test("init - can start built project", async () => {
210210

211211
await withChildProcessServer(
212212
dir,
213-
path.join(dir, "main.ts"),
213+
["serve", "-A", path.join(dir, "main.ts")],
214214
async (address) => {
215215
await withBrowser(async (page) => {
216216
await page.goto(address);

tests/test_utils.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,12 @@ export async function withBrowser(fn: (page: Page) => void | Promise<void>) {
153153

154154
export async function withChildProcessServer(
155155
dir: string,
156-
entry: string,
156+
args: string[],
157157
fn: (address: string) => void | Promise<void>,
158158
) {
159159
const aborter = new AbortController();
160160
const cp = await new Deno.Command(Deno.execPath(), {
161-
args: ["run", "-A", entry],
161+
args,
162162
stdin: "null",
163163
stdout: "piped",
164164
stderr: "inherit",
@@ -187,7 +187,7 @@ export async function withChildProcessServer(
187187
}
188188

189189
if (!found) {
190-
throw new Error(`Could not find server address`);
190+
throw new Error("Could not find server address");
191191
}
192192

193193
try {

0 commit comments

Comments
 (0)