| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 18a2ee5 commit e964c43
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1533,6 +1533,8 @@ class Suite extends Test { | |||
| 1533 | 1533 | } | |
| 1534 | 1534 | ||
| 1535 | 1535 | function getFullName(test) { | |
| 1536 | + if (test === test.root) return test.name; | ||
| 1537 | + | ||
| 1536 | 1538 | let fullName = test.name; | |
| 1537 | 1539 | ||
| 1538 | 1540 | 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