Skip to content

Commit

Permalink
fix: use correct file paths in coverage reports (fix #691) (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
Demivan committed Feb 8, 2022
1 parent e8d87e4 commit aee886e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/vitest/src/integrations/coverage.ts
Expand Up @@ -84,9 +84,9 @@ export async function reportCoverage(ctx: Vitest) {
}
catch {}

const sources = map.sources.length
? map.sources.map(i => pathToFileURL(i).href)
: [url]
// Vite does not report full path in sourcemap sources
// so use an actual file path
const sources = [url]

sourceMapMata[url] = {
source: result.code,
Expand Down

0 comments on commit aee886e

Please sign in to comment.