diff options
author | 2023-06-28 21:56:26 -0700 | |
---|---|---|
committer | 2023-06-28 21:56:26 -0700 | |
commit | 8b2c72300c49b1b52ff40c7a927e1d7ddcb4e7a9 (patch) | |
tree | 3347d7ef0b59ca89b99f1a010879984ce9a87f6e | |
parent | 8481f2922f4f6fe07f8b44067fe478cb1ac1706a (diff) | |
download | bun-8b2c72300c49b1b52ff40c7a927e1d7ddcb4e7a9.tar.gz bun-8b2c72300c49b1b52ff40c7a927e1d7ddcb4e7a9.tar.zst bun-8b2c72300c49b1b52ff40c7a927e1d7ddcb4e7a9.zip |
Another test
-rw-r--r-- | test/js/bun/util/error-gc-test.test.js | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/test/js/bun/util/error-gc-test.test.js b/test/js/bun/util/error-gc-test.test.js index 8cef55760..5f9134d4c 100644 --- a/test/js/bun/util/error-gc-test.test.js +++ b/test/js/bun/util/error-gc-test.test.js @@ -1,5 +1,7 @@ import { test, expect } from "bun:test"; +// This test checks that printing stack traces increments and decrements +// reference-counted strings test("error gc test", () => { for (let i = 0; i < 100; i++) { var fn = function yo() { @@ -24,3 +26,10 @@ test("error gc test", () => { Bun.gc(true); } }); + +test("error gc test #2", () => { + for (let i = 0; i < 1000; i++) { + new Error().stack; + Bun.gc(); + } +}); |