From e8f607f2c4fb0a5becf7b4011147de5561498836 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Fri, 19 Aug 2022 14:00:21 +0200 Subject: [PATCH] windows? --- e2e/__tests__/toMatchInlineSnapshotWithJSX.test.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/e2e/__tests__/toMatchInlineSnapshotWithJSX.test.ts b/e2e/__tests__/toMatchInlineSnapshotWithJSX.test.ts index 41355a03ccc2..89ef4f4cc728 100644 --- a/e2e/__tests__/toMatchInlineSnapshotWithJSX.test.ts +++ b/e2e/__tests__/toMatchInlineSnapshotWithJSX.test.ts @@ -7,6 +7,7 @@ import * as path from 'path'; import * as fs from 'graceful-fs'; +import slash = require('slash'); import {runYarnInstall} from '../Utils'; import {json as runWithJson} from '../runJest'; @@ -32,8 +33,8 @@ it('successfully runs the tests inside `to-match-inline-snapshot-with-jsx/`', () const updateSnapshotRun = runWithJson(DIR, ['--updateSnapshot']); expect( updateSnapshotRun.json.testResults[0].message.replace( - process.cwd(), - '', + new RegExp(`${process.cwd()}[^:]*`), + match => slash(match.replace(process.cwd(), '')), ), ).toMatchInlineSnapshot(` " ● Test suite failed to run