MCPcopy
hub / github.com/remix-run/remix / writeIstanbulReports

Function writeIstanbulReports

packages/test/src/lib/coverage.ts:145–153  ·  view source on GitHub ↗
(coverageMap: CoverageMap, cwd: string, outDir: string)

Source from the content-addressed store, hash-verified

143}
144
145async function writeIstanbulReports(coverageMap: CoverageMap, cwd: string, outDir: string) {
146 await fsp.mkdir(outDir, { recursive: true })
147 let { createContext, reports } = getIstanbul()
148 let ctx = createContext({ coverageMap, dir: outDir } as any)
149 console.log('\nCoverage report:')
150 reports.create('text').execute(ctx)
151 reports.create('lcovonly').execute(ctx)
152 console.log(`\nLCOV coverage written to ${path.relative(cwd, path.join(outDir, 'lcov.info'))}`)
153}
154
155// Convert a single V8 coverage entry to Istanbul format and merge it into the
156// coverage map.

Callers 1

Calls 6

getIstanbulFunction · 0.85
logMethod · 0.80
createMethod · 0.80
joinMethod · 0.80
executeMethod · 0.65
createContextFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…