Skip to content

Commit 84b8c1e

Browse files
committed
test_runner: finish marking snapshot testing as stable
Snapshot testing was marked stable in #55897. These were overlooked at the time. Refs: #55897
1 parent 0dbbaba commit 84b8c1e

File tree

2 files changed

+1
-15
lines changed

2 files changed

+1
-15
lines changed

doc/api/test.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -932,8 +932,6 @@ test('runs timers as setTime passes ticks', (context) => {
932932

933933
## Snapshot testing
934934

935-
> Stability: 1.0 - Early development
936-
937935
Snapshot tests allow arbitrary values to be serialized into string values and
938936
compared against a set of known good values. The known good values are known as
939937
snapshots, and are stored in a snapshot file. Snapshot files are managed by the
@@ -1750,8 +1748,6 @@ describe('tests', async () => {
17501748
added: v22.3.0
17511749
-->
17521750

1753-
> Stability: 1.0 - Early development
1754-
17551751
An object whose methods are used to configure default snapshot settings in the
17561752
current process. It is possible to apply the same configuration to all files by
17571753
placing common configuration code in a module preloaded with `--require` or
@@ -1763,8 +1759,6 @@ placing common configuration code in a module preloaded with `--require` or
17631759
added: v22.3.0
17641760
-->
17651761

1766-
> Stability: 1.0 - Early development
1767-
17681762
* `serializers` {Array} An array of synchronous functions used as the default
17691763
serializers for snapshot tests.
17701764

@@ -1780,8 +1774,6 @@ more robust serialization mechanism is required, this function should be used.
17801774
added: v22.3.0
17811775
-->
17821776

1783-
> Stability: 1.0 - Early development
1784-
17851777
* `fn` {Function} A function used to compute the location of the snapshot file.
17861778
The function receives the path of the test file as its only argument. If the
17871779
test is not associated with a file (for example in the REPL), the input is
@@ -3261,8 +3253,6 @@ test('test', (t) => {
32613253
added: v22.3.0
32623254
-->
32633255

3264-
> Stability: 1.0 - Early development
3265-
32663256
* `value` {any} A value to serialize to a string. If Node.js was started with
32673257
the [`--test-update-snapshots`][] flag, the serialized value is written to
32683258
the snapshot file. Otherwise, the serialized value is compared to the

lib/internal/test_runner/snapshot.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const {
1515
ERR_INVALID_STATE,
1616
},
1717
} = require('internal/errors');
18-
const { emitExperimentalWarning, kEmptyObject } = require('internal/util');
18+
const { kEmptyObject } = require('internal/util');
1919
let debug = require('internal/util/debuglog').debuglog('test_runner', (fn) => {
2020
debug = fn;
2121
});
@@ -28,7 +28,6 @@ const { strictEqual } = require('assert');
2828
const { mkdirSync, readFileSync, writeFileSync } = require('fs');
2929
const { dirname } = require('path');
3030
const { createContext, runInContext } = require('vm');
31-
const kExperimentalWarning = 'Snapshot testing';
3231
const kMissingSnapshotTip = 'Missing snapshots can be generated by rerunning ' +
3332
'the command with the --test-update-snapshots flag.';
3433
const defaultSerializers = [
@@ -47,13 +46,11 @@ let resolveSnapshotPathFn = defaultResolveSnapshotPath;
4746
let serializerFns = defaultSerializers;
4847

4948
function setResolveSnapshotPath(fn) {
50-
emitExperimentalWarning(kExperimentalWarning);
5149
validateFunction(fn, 'fn');
5250
resolveSnapshotPathFn = fn;
5351
}
5452

5553
function setDefaultSnapshotSerializers(serializers) {
56-
emitExperimentalWarning(kExperimentalWarning);
5754
validateFunctionArray(serializers, 'serializers');
5855
serializerFns = ArrayPrototypeSlice(serializers);
5956
}
@@ -207,7 +204,6 @@ class SnapshotManager {
207204
const manager = this;
208205

209206
return function snapshotAssertion(actual, options = kEmptyObject) {
210-
emitExperimentalWarning(kExperimentalWarning);
211207
validateObject(options, 'options');
212208
const {
213209
serializers = serializerFns,

0 commit comments

Comments
 (0)