mirror of
https://github.com/nodejs/node.git
synced 2025-08-15 13:48:44 +02:00

PR-URL: https://github.com/nodejs/node/pull/58418 Refs: https://github.com/nodejs/node/issues/58419 Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com> Reviewed-By: Ethan Arrowood <ethan@arrowood.dev>
16 lines
426 B
JavaScript
16 lines
426 B
JavaScript
import { mustCall } from '../common/index.mjs';
|
|
import { glob } from 'node:fs';
|
|
import process from 'node:process';
|
|
import { strictEqual } from 'node:assert';
|
|
|
|
// One uncaught error is expected
|
|
process.on('uncaughtException', mustCall((err) => {
|
|
strictEqual(err.message, 'blep');
|
|
}));
|
|
|
|
{
|
|
// Test that if callback throws, it's not getting called again
|
|
glob('a/b/c', mustCall(() => {
|
|
throw new Error('blep');
|
|
}));
|
|
}
|