| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent c690b53 commit 0a05d06
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1459,6 +1459,8 @@ class Suite extends Test { | |||
| 1459 | 1459 | } | |
| 1460 | 1460 | ||
| 1461 | 1461 | function getFullName(test) { | |
| 1462 | + if (test === test.root) return test.name; | ||
| 1463 | + | ||
| 1462 | 1464 | let fullName = test.name; | |
| 1463 | 1465 | ||
| 1464 | 1466 | for (let t = test.parent; t !== t.root; t = t.parent) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,11 @@ | |||
| 1 | 1 | 'use strict'; | |
| 2 | 2 | require('../common'); | |
| 3 | 3 | const { strictEqual } = require('node:assert'); | |
| 4 | - const { suite, test } = require('node:test'); | ||
| 4 | + const { before, suite, test } = require('node:test'); | ||
| 5 | + | ||
| 6 | + before((t) => { | ||
| 7 | + strictEqual(t.fullName, '<root>'); | ||
| 8 | + }); | ||
| 5 | 9 | ||
| 6 | 10 | suite('suite', (t) => { | |
| 7 | 11 | strictEqual(t.fullName, 'suite'); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments