diff options
| author | David Sherret <dsherret@users.noreply.github.com> | 2024-02-20 23:22:07 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-20 23:22:07 -0500 |
| commit | 6592a92c203b30a8aae72a645ce1822fd740a2a7 (patch) | |
| tree | 0efe58b3456cae83fd2d600aea9bcec635f7fd95 /tests/testdata | |
| parent | e32c704970d9c332367757cbd21f1905c2d11486 (diff) | |
fix(node/test): disable Deno test sanitizers (#22480)
Closes #22473
Diffstat (limited to 'tests/testdata')
| -rw-r--r-- | tests/testdata/node/test_no_sanitizers/test.js | 28 | ||||
| -rw-r--r-- | tests/testdata/node/test_no_sanitizers/test.out | 5 |
2 files changed, 33 insertions, 0 deletions
diff --git a/tests/testdata/node/test_no_sanitizers/test.js b/tests/testdata/node/test_no_sanitizers/test.js new file mode 100644 index 000000000..d2ca8a6c7 --- /dev/null +++ b/tests/testdata/node/test_no_sanitizers/test.js @@ -0,0 +1,28 @@ +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); +}); diff --git a/tests/testdata/node/test_no_sanitizers/test.out b/tests/testdata/node/test_no_sanitizers/test.out new file mode 100644 index 000000000..f52bed3ab --- /dev/null +++ b/tests/testdata/node/test_no_sanitizers/test.out @@ -0,0 +1,5 @@ +running 2 tests from ./node/test_no_sanitizers/test.js +should not complain about resource and op sanitizers ... + nested test ... ok ([WILDCARD]) +should not complain about resource and op sanitizers ... ok ([WILDCARD]) +should allow exit ...
\ No newline at end of file |
