RN: Node v8 Workaround for `local-cli/core/__tests__`
Reviewed By: raluca-elena Differential Revision: D5224358 fbshipit-source-id: 66c923bd3a38af47fcacbd1ee758bd28253ecf31
This commit is contained in:
parent
223eab930b
commit
6407071424
|
@ -0,0 +1,24 @@
|
|||
/**
|
||||
* Copyright (c) 2013-present, Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD-style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
const fs = require('fs');
|
||||
const mockFS = require('mock-fs');
|
||||
|
||||
/**
|
||||
* @see https://github.com/tschaub/mock-fs/issues/208
|
||||
*/
|
||||
mockFS();
|
||||
if (!fs.statSync(process.cwd()).isDirectory()) {
|
||||
test.only('skipping tests because of mock-fs bug in Node v8.x.x', () => {});
|
||||
}
|
||||
mockFS.restore();
|
|
@ -13,9 +13,8 @@
|
|||
|
||||
jest.autoMockOff();
|
||||
|
||||
const mockFS = require('mock-fs');
|
||||
|
||||
const findAndroidAppFolder = require('../../android/findAndroidAppFolder');
|
||||
const mockFS = require('mock-fs');
|
||||
const mocks = require('../../__fixtures__/android');
|
||||
|
||||
describe('android::findAndroidAppFolder', () => {
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
|
||||
jest.autoMockOff();
|
||||
|
||||
const mockFS = require('mock-fs');
|
||||
require('../../__fixtures__/mockFSWorkaround');
|
||||
|
||||
const findManifest = require('../../android/findManifest');
|
||||
const mockFS = require('mock-fs');
|
||||
const mocks = require('../../__fixtures__/android');
|
||||
|
||||
describe('android::findManifest', () => {
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
|
||||
jest.autoMockOff();
|
||||
|
||||
const mockFS = require('mock-fs');
|
||||
require('../../__fixtures__/mockFSWorkaround');
|
||||
|
||||
const findPackageClassName = require('../../android/findPackageClassName');
|
||||
const mockFS = require('mock-fs');
|
||||
const mocks = require('../../__fixtures__/android');
|
||||
|
||||
describe('android::findPackageClassName', () => {
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
|
||||
jest.autoMockOff();
|
||||
|
||||
const mockFS = require('mock-fs');
|
||||
require('../../__fixtures__/mockFSWorkaround');
|
||||
|
||||
const getDependencyConfig = require('../../android').dependencyConfig;
|
||||
const mockFS = require('mock-fs');
|
||||
const mocks = require('../../__fixtures__/android');
|
||||
|
||||
const userConfig = {};
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
|
||||
jest.autoMockOff();
|
||||
|
||||
const mockFS = require('mock-fs');
|
||||
require('../../__fixtures__/mockFSWorkaround');
|
||||
|
||||
const getProjectConfig = require('../../android').projectConfig;
|
||||
const mockFS = require('mock-fs');
|
||||
const mocks = require('../../__fixtures__/android');
|
||||
|
||||
describe('android::getProjectConfig', () => {
|
||||
|
|
|
@ -13,10 +13,11 @@
|
|||
|
||||
jest.autoMockOff();
|
||||
|
||||
const mockFS = require('mock-fs');
|
||||
require('../../__fixtures__/mockFSWorkaround');
|
||||
|
||||
const findManifest = require('../../android/findManifest');
|
||||
const readManifest = require('../../android/readManifest');
|
||||
const mockFS = require('mock-fs');
|
||||
const mocks = require('../../__fixtures__/android');
|
||||
|
||||
describe('android::readManifest', () => {
|
||||
|
|
|
@ -13,10 +13,9 @@
|
|||
|
||||
jest.autoMockOff();
|
||||
|
||||
const mockFs = require('mock-fs');
|
||||
|
||||
const findAssets = require('../findAssets');
|
||||
const dependencies = require('../__fixtures__/dependencies');
|
||||
const mockFs = require('mock-fs');
|
||||
|
||||
describe('findAssets', () => {
|
||||
beforeEach(() => {
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
|
||||
jest.autoMockOff();
|
||||
|
||||
const mockFS = require('mock-fs');
|
||||
require('../../__fixtures__/mockFSWorkaround');
|
||||
|
||||
const findProject = require('../../ios/findProject');
|
||||
const mockFS = require('mock-fs');
|
||||
const projects = require('../../__fixtures__/projects');
|
||||
const ios = require('../../__fixtures__/ios');
|
||||
|
||||
|
|
|
@ -13,9 +13,10 @@
|
|||
|
||||
jest.autoMockOff();
|
||||
|
||||
const mockFS = require('mock-fs');
|
||||
require('../../__fixtures__/mockFSWorkaround');
|
||||
|
||||
const getProjectConfig = require('../../ios').projectConfig;
|
||||
const mockFS = require('mock-fs');
|
||||
const projects = require('../../__fixtures__/projects');
|
||||
|
||||
describe('ios::getProjectConfig', () => {
|
||||
|
|
|
@ -232,7 +232,7 @@
|
|||
"jest": "19.0.2",
|
||||
"jest-repl": "19.0.2",
|
||||
"jest-runtime": "^19.0.3",
|
||||
"mock-fs": "^3.11.0",
|
||||
"mock-fs": "^4.3.0",
|
||||
"react": "16.0.0-alpha.12",
|
||||
"react-test-renderer": "16.0.0-alpha.12",
|
||||
"shelljs": "0.6.0",
|
||||
|
|
Loading…
Reference in New Issue