mirror of
https://github.com/oven-sh/bun
synced 2026-02-19 23:31:45 +00:00
Co-authored-by: Kai Tamkun <kai@tamkun.io> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Ashcon Partovi <ashcon@partovi.net> Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com> Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Co-authored-by: 190n <190n@users.noreply.github.com>
19 lines
545 B
JavaScript
19 lines
545 B
JavaScript
'use strict';
|
|
const common = require('../../common');
|
|
const assert = require('assert');
|
|
const test_async = require(`./build/${common.buildType}/test_async`);
|
|
|
|
process.on('uncaughtException', common.mustCall(function(err) {
|
|
try {
|
|
throw new Error('should not fail');
|
|
} catch (err) {
|
|
assert.strictEqual(err.message, 'should not fail');
|
|
}
|
|
assert.strictEqual(err.message, 'uncaught');
|
|
}));
|
|
|
|
// Successful async execution and completion callback.
|
|
test_async.Test(5, {}, common.mustCall(function() {
|
|
throw new Error('uncaught');
|
|
}));
|