mirror of https://github.com/status-im/metro.git
Remove "--disable-global-cache" from the internal CLI
Reviewed By: davidaurelio Differential Revision: D7774252 fbshipit-source-id: c398aed714365f1f1010ae76b06dc5ad0fa78c22
This commit is contained in:
parent
fc9bd150e3
commit
b6494d8f81
|
@ -16,6 +16,8 @@ const HttpStore = require('./stores/HttpStore');
|
|||
|
||||
const stableHash = require('./stableHash');
|
||||
|
||||
export type {Options as FileOptions} from './stores/FileStore';
|
||||
export type {Options as HttpOptions} from './stores/HttpStore';
|
||||
export type {CacheStore} from './types.flow';
|
||||
|
||||
module.exports.Cache = Cache;
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
|
||||
jest.useRealTimers();
|
||||
jest
|
||||
.mock('../../lib/TransformCaching')
|
||||
// It's noticeably faster to prevent running watchman from FileWatcher.
|
||||
.mock('child_process', () => ({}))
|
||||
.mock('os', () => ({
|
||||
|
@ -128,11 +127,11 @@ describe('traverseDependencies', function() {
|
|||
assetExts: ['png', 'jpg'],
|
||||
// This pattern is not expected to match anything.
|
||||
blacklistRE: /.^/,
|
||||
cacheStores: [],
|
||||
providesModuleNodeModules: ['haste-fbjs', 'react-haste', 'react-native'],
|
||||
platforms: new Set(['ios', 'android']),
|
||||
maxWorkers: 1,
|
||||
resetCache: true,
|
||||
transformCache: require('TransformCaching').mocked(),
|
||||
transformCode: (module, sourceCode, transformOptions) => {
|
||||
return new Promise(resolve => {
|
||||
// require call must stay inline, so the latest defined mock is used!
|
||||
|
|
|
@ -10,14 +10,11 @@
|
|||
|
||||
'use strict';
|
||||
|
||||
jest
|
||||
.mock('fs', () => new (require('metro-memory-fs'))())
|
||||
.mock('../../lib/TransformCaching');
|
||||
jest.mock('fs', () => new (require('metro-memory-fs'))());
|
||||
|
||||
const AssetModule = require('../AssetModule');
|
||||
const DependencyGraphHelpers = require('../DependencyGraph/DependencyGraphHelpers');
|
||||
const ModuleCache = require('../ModuleCache');
|
||||
const TransformCaching = require('../../lib/TransformCaching');
|
||||
const fs = require('fs');
|
||||
|
||||
describe('AssetModule:', () => {
|
||||
|
@ -43,7 +40,6 @@ describe('AssetModule:', () => {
|
|||
getTransformCacheKey: () => 'foo',
|
||||
localPath: 'image.png',
|
||||
moduleCache: new ModuleCache({}),
|
||||
options: {transformCache: TransformCaching.mocked()},
|
||||
transformCode: () => {
|
||||
return Promise.resolve({code: 'module.exports = "asset";'});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue