aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-06-28 21:56:26 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2023-06-28 21:56:26 -0700
commit8b2c72300c49b1b52ff40c7a927e1d7ddcb4e7a9 (patch)
tree3347d7ef0b59ca89b99f1a010879984ce9a87f6e
parent8481f2922f4f6fe07f8b44067fe478cb1ac1706a (diff)
downloadbun-8b2c72300c49b1b52ff40c7a927e1d7ddcb4e7a9.tar.gz
bun-8b2c72300c49b1b52ff40c7a927e1d7ddcb4e7a9.tar.zst
bun-8b2c72300c49b1b52ff40c7a927e1d7ddcb4e7a9.zip
Another test
-rw-r--r--test/js/bun/util/error-gc-test.test.js9
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();
+ }
+});