From ec646f365f24dec98f7a2182120f678582a9151d Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Tue, 26 May 2020 11:54:45 -0700 Subject: [PATCH] Fix tests runInit.node.ts failing on Windows (#1198) Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/1198 Normalize paths so snapshots look the same on mac and win Reviewed By: passy Differential Revision: D21722773 fbshipit-source-id: 4a12117d3ec0fb57cdfc7c5bb06a5c0835412a5f --- desktop/pkg/src/__tests__/runInit.node.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desktop/pkg/src/__tests__/runInit.node.ts b/desktop/pkg/src/__tests__/runInit.node.ts index 38597e2ed..d2c2b9560 100644 --- a/desktop/pkg/src/__tests__/runInit.node.ts +++ b/desktop/pkg/src/__tests__/runInit.node.ts @@ -18,7 +18,7 @@ beforeEach(() => { // no implementation } function writeFile(name: string, contents: string) { - files[name] = contents; + files[name.replace(/\\/g, '/')] = contents; } files = {};