MCPcopy Create free account
hub / github.com/nodejs/node / resolveSnapshotFile

Method resolveSnapshotFile

lib/internal/test_runner/snapshot.js:141–159  ·  view source on GitHub ↗
(entryFile)

Source from the content-addressed store, hash-verified

139 }
140
141 resolveSnapshotFile(entryFile) {
142 let snapshotFile = this.cache.get(entryFile);
143
144 if (snapshotFile === undefined) {
145 const resolved = resolveSnapshotPathFn(entryFile);
146
147 if (typeof resolved !== 'string') {
148 const err = new ERR_INVALID_STATE('Invalid snapshot filename.');
149 err.filename = resolved;
150 throw err;
151 }
152
153 snapshotFile = new SnapshotFile(resolved);
154 snapshotFile.loaded = this.updateSnapshots;
155 this.cache.set(entryFile, snapshotFile);
156 }
157
158 return snapshotFile;
159 }
160
161 serialize(input, serializers = serializerFns) {
162 try {

Callers 2

createAssertMethod · 0.80

Calls 2

getMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected