mirror of
https://github.com/zebrajr/node.git
synced 2026-01-15 12:15:26 +00:00
PR-URL: https://github.com/nodejs/node/pull/60726 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
17 lines
424 B
JavaScript
17 lines
424 B
JavaScript
import { mustCall } from '../common/index.mjs';
|
|
import { glob } from 'node:fs';
|
|
import process from 'node:process';
|
|
import assert from 'node:assert';
|
|
|
|
// One uncaught error is expected
|
|
process.on('uncaughtException', mustCall((err) => {
|
|
assert.strictEqual(err.message, 'blep');
|
|
}));
|
|
|
|
{
|
|
// Test that if callback throws, it's not getting called again
|
|
glob('a/b/c', mustCall(() => {
|
|
throw new Error('blep');
|
|
}));
|
|
}
|