summaryrefslogtreecommitdiff
path: root/cli/js/dispatch_json_test.ts
diff options
context:
space:
mode:
Diffstat (limited to 'cli/js/dispatch_json_test.ts')
-rw-r--r--cli/js/dispatch_json_test.ts27
1 files changed, 12 insertions, 15 deletions
diff --git a/cli/js/dispatch_json_test.ts b/cli/js/dispatch_json_test.ts
index 50efeb360..a2306dda8 100644
--- a/cli/js/dispatch_json_test.ts
+++ b/cli/js/dispatch_json_test.ts
@@ -1,10 +1,4 @@
-import {
- assert,
- test,
- testPerm,
- assertMatch,
- unreachable
-} from "./test_util.ts";
+import { assert, unitTest, assertMatch, unreachable } from "./test_util.ts";
const openErrorStackPattern = new RegExp(
`^.*
@@ -14,15 +8,18 @@ const openErrorStackPattern = new RegExp(
"ms"
);
-testPerm({ read: true }, async function sendAsyncStackTrace(): Promise<void> {
- await Deno.open("nonexistent.txt")
- .then(unreachable)
- .catch((error): void => {
- assertMatch(error.stack, openErrorStackPattern);
- });
-});
+unitTest(
+ { perms: { read: true } },
+ async function sendAsyncStackTrace(): Promise<void> {
+ await Deno.open("nonexistent.txt")
+ .then(unreachable)
+ .catch((error): void => {
+ assertMatch(error.stack, openErrorStackPattern);
+ });
+ }
+);
-test(async function malformedJsonControlBuffer(): Promise<void> {
+unitTest(async function malformedJsonControlBuffer(): Promise<void> {
// @ts-ignore
const opId = Deno.core.ops()["op_open"];
// @ts-ignore