aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/test/jest.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/bun.js/test/jest.zig')
-rw-r--r--src/bun.js/test/jest.zig10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/bun.js/test/jest.zig b/src/bun.js/test/jest.zig
index 3a281efa3..6882e547b 100644
--- a/src/bun.js/test/jest.zig
+++ b/src/bun.js/test/jest.zig
@@ -1701,7 +1701,7 @@ pub const DescribeScope = struct {
return scope.run(new_this, ctx, callback, exception);
}
- pub fn run(this: *DescribeScope, thisObject: js.JSObjectRef, ctx: js.JSContextRef, callback: js.JSObjectRef, exception: js.ExceptionRef) js.JSObjectRef {
+ pub fn run(this: *DescribeScope, thisObject: js.JSObjectRef, ctx: js.JSContextRef, callback: js.JSObjectRef, _: js.ExceptionRef) js.JSObjectRef {
if (comptime is_bindgen) return undefined;
js.JSValueProtect(ctx, callback);
defer js.JSValueUnprotect(ctx, callback);
@@ -1720,13 +1720,13 @@ pub const DescribeScope = struct {
switch (prom.status(ctx.ptr().vm())) {
JSPromise.Status.Fulfilled => {},
else => {
- exception.* = prom.result(ctx.ptr().vm()).asObjectRef();
- return null;
+ ctx.bunVM().runErrorHandlerWithDedupe(prom.result(ctx.ptr().vm()), null);
+ return JSC.JSValue.jsUndefined().asObjectRef();
},
}
} else if (result.toError()) |err| {
- exception.* = err.asObjectRef();
- return null;
+ ctx.bunVM().runErrorHandlerWithDedupe(err, null);
+ return JSC.JSValue.jsUndefined().asObjectRef();
}
}