summaryrefslogtreecommitdiff
path: root/tests/unit/test_util.ts
diff options
context:
space:
mode:
Diffstat (limited to 'tests/unit/test_util.ts')
-rw-r--r--tests/unit/test_util.ts15
1 files changed, 7 insertions, 8 deletions
diff --git a/tests/unit/test_util.ts b/tests/unit/test_util.ts
index ba9bf1839..db2585ebd 100644
--- a/tests/unit/test_util.ts
+++ b/tests/unit/test_util.ts
@@ -35,14 +35,9 @@ export function execCode(code: string): Promise<readonly [number, string]> {
return execCode2(code).finished();
}
-export function execCode2(code: string) {
- const command = new Deno.Command(Deno.execPath(), {
- args: [
- "eval",
- "--unstable",
- "--no-check",
- code,
- ],
+export function execCode3(cmd: string, args: string[]) {
+ const command = new Deno.Command(cmd, {
+ args,
stdout: "piped",
stderr: "inherit",
});
@@ -82,6 +77,10 @@ export function execCode2(code: string) {
};
}
+export function execCode2(code: string) {
+ return execCode3(Deno.execPath(), ["eval", "--unstable", "--no-check", code]);
+}
+
export function tmpUnixSocketPath(): string {
const folder = Deno.makeTempDirSync();
return join(folder, "socket");