Skip to content

Commit

Permalink
inline require slash in mock
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Dec 18, 2018
1 parent dd8cfe0 commit 5572665
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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];
}
Expand Down

0 comments on commit 5572665

Please sign in to comment.