mirror of
https://github.com/status-im/react-native.git
synced 2025-02-23 06:38:13 +00:00
Summary: @public Otherwise tests using `path` but not `fs` have an empty mock, as it happens on https://github.com/facebook/metro/issues/235#issuecomment-423722747 Reviewed By: mjesun Differential Revision: D10008513 fbshipit-source-id: 673e2ca79c8105a68818985dc08fe7ccd5d13881
23 lines
406 B
JavaScript
23 lines
406 B
JavaScript
/**
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*
|
|
* @format
|
|
*/
|
|
|
|
'use strict';
|
|
|
|
const mockPath = {};
|
|
|
|
function reset(platform) {
|
|
Object.assign(mockPath, jest.requireActual('path')[platform]);
|
|
}
|
|
|
|
mockPath.mock = {reset};
|
|
|
|
reset('posix');
|
|
|
|
module.exports = mockPath;
|