diff --git a/desktop/pkg/src/__tests__/runLint.node.ts b/desktop/pkg/src/__tests__/runLint.node.ts index c4e2efe04..e12d5715c 100644 --- a/desktop/pkg/src/__tests__/runLint.node.ts +++ b/desktop/pkg/src/__tests__/runLint.node.ts @@ -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');