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

Method toRealFilePath

test/common/wpt.js:185–195  ·  view source on GitHub ↗
(from, url)

Source from the content-addressed store, hash-verified

183 }
184
185 toRealFilePath(from, url) {
186 // We need to patch this to load the WebIDL parser
187 url = url.replace(
188 '/resources/WebIDLParser.js',
189 '/resources/webidl2/lib/webidl2.js',
190 );
191 const base = path.dirname(from);
192 return url.startsWith('/') ?
193 fixtures.path('wpt', url) :
194 fixtures.path('wpt', base, url);
195 }
196
197 /**
198 * Load a resource in test/fixtures/wpt specified with a URL

Callers 3

readMethod · 0.95
readAsFetchMethod · 0.95
runJsTestsMethod · 0.80

Calls 1

pathMethod · 0.45

Tested by

no test coverage detected