mirror of
https://github.com/denoland/deno.git
synced 2025-01-27 17:33:23 -05:00
29 lines
571 B
JavaScript
29 lines
571 B
JavaScript
|
import test from "node:test";
|
||
|
|
||
|
test("should not complain about resource and op sanitizers", async (t) => {
|
||
|
// resource
|
||
|
const _file1 = Deno.open("welcome.ts");
|
||
|
|
||
|
await t.test("nested test", () => {
|
||
|
// resource
|
||
|
const _file2 = Deno.open("cat.ts");
|
||
|
|
||
|
// op
|
||
|
crypto.subtle.digest(
|
||
|
"SHA-256",
|
||
|
new TextEncoder().encode("a".repeat(1_000_000)),
|
||
|
);
|
||
|
});
|
||
|
|
||
|
// op
|
||
|
crypto.subtle.digest(
|
||
|
"SHA-256",
|
||
|
new TextEncoder().encode("a".repeat(1_000_000)),
|
||
|
);
|
||
|
});
|
||
|
|
||
|
test("should allow exit", () => {
|
||
|
// no exit sanitizers
|
||
|
Deno.exit(123);
|
||
|
});
|