MCPcopy Create free account
hub / github.com/nodejs/node / #getAccessValue

Method #getAccessValue

lib/internal/test_runner/mock/mock.js:373–383  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

371 }
372
373 #getAccessValue(value) {
374 const accessIndex = this.#accesses.length;
375 let accessValue;
376 if (this.#onceValues.has(accessIndex)) {
377 accessValue = this.#onceValues.get(accessIndex);
378 this.#onceValues.delete(accessIndex);
379 } else {
380 accessValue = value;
381 }
382 return accessValue;
383 }
384
385 /**
386 * Sets a value to be used only for the next access (get or set), or a specific access index.

Callers 2

constructorMethod · 0.95
mockImplementationMethod · 0.95

Calls 3

hasMethod · 0.65
getMethod · 0.65
deleteMethod · 0.65

Tested by

no test coverage detected