Skip to content

Commit 3f00726

Browse files
committed
windows slashes
1 parent 11f1edb commit 3f00726

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/jest-runtime/src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import {parse as parseCjs} from 'cjs-module-lexer';
2222
import {CoverageInstrumenter, V8Coverage} from 'collect-v8-coverage';
2323
import execa = require('execa');
2424
import * as fs from 'graceful-fs';
25+
import slash = require('slash');
2526
import stripBOM = require('strip-bom');
2627
import type {
2728
Jest,
@@ -2004,7 +2005,7 @@ export default class Runtime {
20042005

20052006
private _logFormattedReferenceError(errorMessage: string) {
20062007
const testPath = this._testPath
2007-
? ` From ${path.relative(this._config.rootDir, this._testPath)}.`
2008+
? ` From ${slash(path.relative(this._config.rootDir, this._testPath))}.`
20082009
: '';
20092010
const originalStack = new ReferenceError(`${errorMessage}${testPath}`)
20102011
.stack!.split('\n')

0 commit comments

Comments
 (0)