2024-02-20 23:22:07 -05:00
|
|
|
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)),
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
2024-02-21 14:10:51 -05:00
|
|
|
// TODO(mmastrac): This works, but we don't reliably flush stdout/stderr here, making this test flake
|
|
|
|
// test("should allow exit", () => {
|
|
|
|
// // no exit sanitizers
|
|
|
|
// Deno.exit(123);
|
|
|
|
// });
|