Skip to content

Commit

Permalink
fix: hide ignored stacktrace on windows (#1116)
Browse files Browse the repository at this point in the history
  • Loading branch information
sapphi-red committed Apr 6, 2022
1 parent c4d1151 commit 57c048b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vitest/src/utils/source-map.ts
Expand Up @@ -2,7 +2,7 @@ import { SourceMapConsumer } from 'source-map-js'
import type { RawSourceMap } from 'vite-node'
import type { ErrorWithDiff, ParsedStack, Position } from '../types'
import type { Vitest } from '../node'
import { notNullish } from './base'
import { notNullish, slash } from './base'

export const lineSplitRE = /\r?\n/

Expand Down Expand Up @@ -58,7 +58,7 @@ export function parseStacktrace(e: ErrorWithDiff, full = false): ParsedStack[] {
if (!match)
return null

let file = match[2]
let file = slash(match[2])
if (file.startsWith('file://'))
file = file.slice(7)

Expand Down

0 comments on commit 57c048b

Please sign in to comment.