aboutsummaryrefslogtreecommitdiff
path: root/test/harness.ts
diff options
context:
space:
mode:
Diffstat (limited to 'test/harness.ts')
-rw-r--r--test/harness.ts8
1 files changed, 6 insertions, 2 deletions
diff --git a/test/harness.ts b/test/harness.ts
index b3932129d..c82ecf698 100644
--- a/test/harness.ts
+++ b/test/harness.ts
@@ -1,6 +1,5 @@
import { gc as bunGC, unsafe } from "bun";
import { heapStats } from "bun:jsc";
-import { expect } from "bun:test";
export const bunEnv: any = {
...process.env,
@@ -30,7 +29,12 @@ export function gc(force = true) {
* @param maxWait
* @returns
*/
-export async function expectMaxObjectTypeCount(type: string, count: number, maxWait = 1000) {
+export async function expectMaxObjectTypeCount(
+ expect: typeof import("bun:test").expect,
+ type: string,
+ count: number,
+ maxWait = 1000,
+) {
gc();
if (heapStats().objectTypeCounts[type] <= count) return;
gc(true);