mirror of
https://github.com/nodejs/node.git
synced 2026-11-09 15:11:11 -05:00
Signed-off-by: lazerg <lazerg2@gmail.com> Assisted-by: Claude PR-URL: https://github.com/nodejs/node/pull/66550 Fixes: https://github.com/nodejs/node/issues/66549 Reviewed-By: Moshe Atlow <moshe@atlow.co.il> Reviewed-By: Chemi Atlow <chemi@atlow.co.il> Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com> Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
21 lines
631 B
JavaScript
21 lines
631 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
const assert = require('node:assert');
|
|
const fixtures = require('../common/fixtures');
|
|
const { run } = require('node:test');
|
|
|
|
const testFile = fixtures.path('test-runner', 'throws-after-test.mjs');
|
|
const testRun = run({
|
|
files: [testFile],
|
|
isolation: 'none'
|
|
});
|
|
|
|
testRun.on('test:pass', common.mustCall((test) => {
|
|
assert.strictEqual(test.name, 'registered before the error');
|
|
}));
|
|
|
|
testRun.on('test:fail', common.mustCall((test) => {
|
|
assert.strictEqual(test.name, testFile);
|
|
assert.match(test.details.error.toString(), /TypeError: Cannot read properties of null/);
|
|
}));
|