refactor: remove deno.run (#1036)

Co-authored-by: Luca Casonato <hello@lcas.dev>
This commit is contained in:
Sylvain Cau
2023-03-10 04:57:16 +09:00
committed by GitHub
co-authored by Luca Casonato
parent 891503e77f
commit 7e72fa236c
6 changed files with 63 additions and 88 deletions
+4 -5
View File
@@ -54,14 +54,14 @@ Deno.test({
name: "/with-island hydration",
async fn(t) {
// Preparation
const serverProcess = Deno.run({
cmd: ["deno", "run", "-A", "./tests/fixture_plugin/main.ts"],
const serverProcess = new Deno.Command(Deno.execPath(), {
args: ["run", "-A", "./tests/fixture_plugin/main.ts"],
stdout: "piped",
stderr: "inherit",
});
}).spawn();
const decoder = new TextDecoderStream();
const lines = serverProcess.stdout.readable
const lines = serverProcess.stdout
.pipeThrough(decoder)
.pipeThrough(new TextLineStream());
@@ -98,7 +98,6 @@ Deno.test({
await lines.cancel();
serverProcess.kill("SIGTERM");
serverProcess.close();
},
sanitizeOps: false,
sanitizeResources: false,