This commit updates a test runner fixture that includes a failing child test. However, the nested test is created using the top level test() function instead t.test(). This commit updates the fixture to use t.test(), while preserving the expected failure. Refs: https://github.com/nodejs/node/pull/47164 PR-URL: https://github.com/nodejs/node/pull/52185 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
17 lines
488 B
JavaScript
17 lines
488 B
JavaScript
'use strict';
|
|
process.env.FORCE_COLOR = '1';
|
|
delete process.env.NODE_DISABLE_COLORS;
|
|
delete process.env.NO_COLOR;
|
|
|
|
require('../../../common');
|
|
const test = require('node:test');
|
|
|
|
test('should pass', () => {});
|
|
test('should fail', () => { throw new Error('fail'); });
|
|
test('should skip', { skip: true }, () => {});
|
|
test('parent', (t) => {
|
|
t.test('should fail', () => { throw new Error('fail'); });
|
|
t.test('should pass but parent fail', (t, done) => {
|
|
setImmediate(done);
|
|
});
|
|
});
|