summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/trace_test.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/js/trace_test.ts b/js/trace_test.ts
index ac83c1064..f0c0afc13 100644
--- a/js/trace_test.ts
+++ b/js/trace_test.ts
@@ -8,7 +8,7 @@ testPerm({ write: true }, async function traceFunctionSuccess() {
// Mixing sync and async calls
const filename = deno.makeTempDirSync() + "/test.txt";
await deno.writeFile(filename, data, 0o666);
- await deno.removeSync(filename);
+ deno.removeSync(filename);
});
assertEqual(op.length, 3);
assertEqual(op[0], { sync: true, name: "MakeTempDir" });
@@ -25,7 +25,7 @@ testPerm({ write: true }, async function tracePromiseSuccess() {
// Mixing sync and async calls
const filename = deno.makeTempDirSync() + "/test.txt";
await deno.writeFile(filename, data, 0o666);
- await deno.removeSync(filename);
+ deno.removeSync(filename);
};
const promise = Promise.resolve().then(asyncFunction);
const op = await deno.trace(promise);
@@ -39,7 +39,7 @@ testPerm({ write: true }, async function traceRepeatSuccess() {
const op1 = await deno.trace(async () => await deno.makeTempDir());
assertEqual(op1.length, 1);
assertEqual(op1[0], { sync: false, name: "MakeTempDir" });
- const op2 = await deno.trace(async () => await deno.statSync("."));
+ const op2 = await deno.trace(() => deno.statSync("."));
assertEqual(op2.length, 1);
assertEqual(op2[0], { sync: true, name: "Stat" });
});
@@ -75,7 +75,7 @@ testPerm({ write: true }, async function traceIdempotence() {
assertEqual(op3[0], { sync: false, name: "Remove" });
// Expect top-level repeat still works after all the nestings
- const op4 = await deno.trace(async () => await deno.statSync("."));
+ const op4 = await deno.trace(() => deno.statSync("."));
assertEqual(op4.length, 1);
assertEqual(op4[0], { sync: true, name: "Stat" });
});