From 557266599d9b2fbf8fb96b62d73b731916b490f5 Mon Sep 17 00:00:00 2001 From: Simen Bekkhus Date: Tue, 18 Dec 2018 08:35:28 +0100 Subject: [PATCH] inline require slash in mock --- packages/jest-runtime/src/__tests__/script_transformer.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/jest-runtime/src/__tests__/script_transformer.test.js b/packages/jest-runtime/src/__tests__/script_transformer.test.js index 8c5e1c8d9ca1..55f8c755fda8 100644 --- a/packages/jest-runtime/src/__tests__/script_transformer.test.js +++ b/packages/jest-runtime/src/__tests__/script_transformer.test.js @@ -17,7 +17,7 @@ jest ReadStream: jest.requireActual('fs').ReadStream, WriteStream: jest.requireActual('fs').WriteStream, readFileSync: jest.fn((path, options) => { - const normalizedPath = slash(path); + const normalizedPath = require('slash')(filePath); if (mockFs[normalizedPath]) { return mockFs[normalizedPath]; }