mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Fix some errors not showing up in GitHub annotations (#8799)
* Remove dead code now that `expect()` can be used outside of tests * Fix some errors not being rendered to GitHub annotations * [autofix.ci] apply automated fixes * Update jest.zig Try `execCallback` --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1025,8 +1025,7 @@ pub const TestCommand = struct {
|
||||
|
||||
switch (promise.status(vm.global.vm())) {
|
||||
.Rejected => {
|
||||
const result = promise.result(vm.global.vm());
|
||||
vm.runErrorHandler(result, null);
|
||||
vm.onUnhandledError(vm.global, promise.result(vm.global.vm()));
|
||||
reporter.summary.fail += 1;
|
||||
|
||||
if (reporter.jest.bail == reporter.summary.fail) {
|
||||
@@ -1110,8 +1109,8 @@ pub const TestCommand = struct {
|
||||
|
||||
if (is_last) {
|
||||
if (jest.Jest.runner != null) {
|
||||
if (jest.DescribeScope.runGlobalCallbacks(vm.global, .afterAll)) |after| {
|
||||
vm.global.bunVM().runErrorHandler(after, null);
|
||||
if (jest.DescribeScope.runGlobalCallbacks(vm.global, .afterAll)) |err| {
|
||||
vm.onUnhandledError(vm.global, err);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user