MCPcopy Index your code
hub / github.com/nodejs/node / getSnapshot

Method getSnapshot

lib/internal/test_runner/snapshot.js:68–78  ·  view source on GitHub ↗
(id)

Source from the content-addressed store, hash-verified

66 }
67
68 getSnapshot(id) {
69 if (!(id in this.snapshots)) {
70 const err = new ERR_INVALID_STATE(`Snapshot '${id}' not found in ` +
71 `'${this.snapshotFile}.' ${kMissingSnapshotTip}`);
72 err.snapshot = id;
73 err.filename = this.snapshotFile;
74 throw err;
75 }
76
77 return this.snapshots[id];
78 }
79
80 setSnapshot(id, value) {
81 this.snapshots[escapeSnapshotKey(id)] = value;

Callers 2

createAssertMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected