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

Method read

test/common/wpt.js:204–207  ·  view source on GitHub ↗

* Load a resource in test/fixtures/wpt specified with a URL * @param {string} from the path of the file loading this resource, * relative to the WPT folder. * @param {string} url the url of the resource being loaded. * @returns {string}

(from, url)

Source from the content-addressed store, hash-verified

202 * @returns {string}
203 */
204 read(from, url) {
205 const file = this.toRealFilePath(from, url);
206 return fs.readFileSync(file, 'utf8');
207 }
208
209 /**
210 * Load a resource in test/fixtures/wpt specified with a URL

Callers 15

GetRunConfigurationMethod · 0.45
GetSourceMethod · 0.45
GetRunConfigurationMethod · 0.45
GetSourceMethod · 0.45
runJsTestsMethod · 0.45
createObjectFunction · 0.45
createJSHeapSnapshotFunction · 0.45

Calls 2

toRealFilePathMethod · 0.95
readFileSyncMethod · 0.45

Tested by 8

GetRunConfigurationMethod · 0.36
GetSourceMethod · 0.36
testFunction · 0.36
testFunction · 0.36
testFunction · 0.36
testFunction · 0.36
GetRunConfigurationMethod · 0.36
GetSourceMethod · 0.36