MCPcopy Create free account
hub / github.com/observablehq/framework / mockResolveFile

Function mockResolveFile

test/javascript/transpile-test.ts:24–28  ·  view source on GitHub ↗
(specifier: string)

Source from the content-addressed store, hash-verified

22}
23
24function mockResolveFile(specifier: string): string {
25 return isPathImport(specifier)
26 ? `./${join("_file", specifier)}`
27 : specifier.replace(/^npm:/, "https://cdn.jsdelivr.net/npm/");
28}
29
30function runTests(inputRoot: string, outputRoot: string, filter: (name: string) => boolean = () => true) {
31 for (const name of readdirSync(inputRoot)) {

Callers

nothing calls this directly

Calls 1

isPathImportFunction · 0.85

Tested by

no test coverage detected