Fix tests on Windows (#1072)
Summary: Pull Request resolved: https://github.com/facebook/flipper/pull/1072 Once again fixed GH windows jobs which are currently failing Reviewed By: mweststrate Differential Revision: D21277273 fbshipit-source-id: 0df6ee7eb00b8f72bd6952747fa0e25e787ca335
This commit is contained in:
committed by
Facebook GitHub Bot
parent
c1b97e5d1f
commit
deb0daa7f3
@@ -9,6 +9,7 @@
|
||||
|
||||
import runLint from '../utils/runLint';
|
||||
import fs from 'fs-extra';
|
||||
import path from 'path';
|
||||
|
||||
const validPackageJson = {
|
||||
$schema: 'https://fbflipper.com/schemas/plugin-package/v2.json',
|
||||
@@ -124,7 +125,9 @@ test('flippeBundlerEntry must point to an existing file', async () => {
|
||||
testPackageJson.flipperBundlerEntry = 'unexisting/file';
|
||||
fs.pathExistsSync = jest
|
||||
.fn()
|
||||
.mockImplementation((path) => !path.includes('unexisting/file'));
|
||||
.mockImplementation(
|
||||
(filePath) => !filePath.includes(path.join('unexisting', 'file')),
|
||||
);
|
||||
const json = JSON.stringify(testPackageJson);
|
||||
fs.readFile = jest.fn().mockResolvedValue(new Buffer(json));
|
||||
const result = await runLint('dir');
|
||||
|
||||
Reference in New Issue
Block a user