From db2c505946a86fd69ecea8ce918edab8cb782006 Mon Sep 17 00:00:00 2001 From: PaulyBearCoding Date: Mon, 17 Nov 2025 13:52:36 -0800 Subject: [PATCH 1/3] doc: add fullName property to SuiteContext Add documentation for the missing fullName property in SuiteContext. This property returns the name of the suite and each of its ancestors, separated by '>'. The property has been available since v22.3.0 but was missing from the documentation. Fixes: https://github.com/nodejs/node/issues/60757 --- doc/api/test.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/doc/api/test.md b/doc/api/test.md index 21349b46b702e8..c63915a9f17c52 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -1045,7 +1045,7 @@ test('runs timers as setTime passes ticks', (context) => { ## Snapshot testing An object whose methods are used to configure default snapshot settings in the @@ -1926,7 +1926,7 @@ placing common configuration code in a module preloaded with `--require` or ### `snapshot.setDefaultSnapshotSerializers(serializers)` * `serializers` {Array} An array of synchronous functions used as the default @@ -1941,7 +1941,7 @@ more robust serialization mechanism is required, this function should be used. ### `snapshot.setResolveSnapshotPath(fn)` * `fn` {Function} A function used to compute the location of the snapshot file. @@ -3602,7 +3602,7 @@ highlighting. #### `context.assert.snapshot(value[, options])` * `value` {any} A value to serialize to a string. If Node.js was started with @@ -3667,7 +3667,7 @@ the path of the root test file. ### `context.fullName` The name of the test and each of its ancestors, separated by `>`. @@ -3970,6 +3970,14 @@ The absolute path of the test file that created the current suite. If a test file imports additional modules that generate suites, the imported suites will return the path of the root test file. +### `context.fullName` + + + +The name of the suite and each of its ancestors, separated by `>`. + ### `context.name` The name of the test and each of its ancestors, separated by `>`. @@ -3973,7 +3975,9 @@ return the path of the root test file. ### `context.fullName` The name of the suite and each of its ancestors, separated by `>`. From 3804dcc56a84034636b74db1c5bbf27365d2c404 Mon Sep 17 00:00:00 2001 From: PaulyBearCoding Date: Fri, 21 Nov 2025 16:48:28 -0800 Subject: [PATCH 3/3] doc: revert snapshot testing version changes Revert snapshot testing related items back to v22.3.0 as snapshot testing was never backported to v20.x. Only context.fullName was backported to v20.16.0. - Reverted ## Snapshot testing to v22.3.0 - Reverted ## snapshot to v22.3.0 - Reverted snapshot.setDefaultSnapshotSerializers to v22.3.0 - Reverted snapshot.setResolveSnapshotPath to v22.3.0 - Reverted context.assert.snapshot to v22.3.0 - Kept fullName properties with YAML list format (v22.3.0 and v20.16.0) --- doc/api/test.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/api/test.md b/doc/api/test.md index 883f315d5ef25b..6aac0db2e16067 100644 --- a/doc/api/test.md +++ b/doc/api/test.md @@ -1045,7 +1045,7 @@ test('runs timers as setTime passes ticks', (context) => { ## Snapshot testing An object whose methods are used to configure default snapshot settings in the @@ -1926,7 +1926,7 @@ placing common configuration code in a module preloaded with `--require` or ### `snapshot.setDefaultSnapshotSerializers(serializers)` * `serializers` {Array} An array of synchronous functions used as the default @@ -1941,7 +1941,7 @@ more robust serialization mechanism is required, this function should be used. ### `snapshot.setResolveSnapshotPath(fn)` * `fn` {Function} A function used to compute the location of the snapshot file. @@ -3602,7 +3602,7 @@ highlighting. #### `context.assert.snapshot(value[, options])` * `value` {any} A value to serialize to a string. If Node.js was started with