Files
node/test/parallel/test-runner-test-fullname.js
Antoine du Hamel fc203b36f4 test: ensure assertions are reached on more tests
PR-URL: https://github.com/nodejs/node/pull/60763
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2025-11-24 23:51:26 +01:00

29 lines
696 B
JavaScript

'use strict';
const common = require('../common');
const assert = require('node:assert');
const { before, suite, test } = require('node:test');
before(common.mustCall((t) => {
assert.strictEqual(t.fullName, '<root>');
}));
suite('suite', common.mustCall((t) => {
assert.strictEqual(t.fullName, 'suite');
test('test', (t) => {
assert.strictEqual(t.fullName, 'suite > test');
t.test('subtest', (t) => {
assert.strictEqual(t.fullName, 'suite > test > subtest');
t.test('subsubtest', (t) => {
assert.strictEqual(t.fullName, 'suite > test > subtest > subsubtest');
});
});
});
}));
test((t) => {
assert.strictEqual(t.fullName, '<anonymous>');
});