diff --git a/react-packager/src/Activity/__mocks__/chalk.js b/react-packager/src/Activity/__mocks__/chalk.js deleted file mode 100644 index 2981f979..00000000 --- a/react-packager/src/Activity/__mocks__/chalk.js +++ /dev/null @@ -1,13 +0,0 @@ -/** - * Copyright (c) 2015-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. - */ -'use strict'; - -module.exports = { - dim: function(s) { return s; }, -}; diff --git a/react-packager/src/Activity/__tests__/Activity-test.js b/react-packager/src/Activity/__tests__/Activity-test.js index c854aa33..e8fda3dc 100644 --- a/react-packager/src/Activity/__tests__/Activity-test.js +++ b/react-packager/src/Activity/__tests__/Activity-test.js @@ -9,6 +9,9 @@ 'use strict'; jest.autoMockOff(); +jest.setMock('chalk', { + dim: function(s) { return s; }, +}); describe('Activity', function() { var Activity; diff --git a/react-packager/src/DependencyResolver/DependencyGraph/__tests__/DependencyGraph-test.js b/react-packager/src/DependencyResolver/DependencyGraph/__tests__/DependencyGraph-test.js index 595b1f7c..c5f06032 100644 --- a/react-packager/src/DependencyResolver/DependencyGraph/__tests__/DependencyGraph-test.js +++ b/react-packager/src/DependencyResolver/DependencyGraph/__tests__/DependencyGraph-test.js @@ -22,7 +22,8 @@ jest .dontMock('../../AssetModule') .dontMock('../../Module') .dontMock('../../Package') - .dontMock('../../ModuleCache'); + .dontMock('../../ModuleCache') + .setMock('chalk', { dim: function(s) { return s; } }); const Promise = require('promise'); diff --git a/react-packager/src/DependencyResolver/__tests__/HasteDependencyResolver-test.js b/react-packager/src/DependencyResolver/__tests__/HasteDependencyResolver-test.js index da159b5e..2ac854e4 100644 --- a/react-packager/src/DependencyResolver/__tests__/HasteDependencyResolver-test.js +++ b/react-packager/src/DependencyResolver/__tests__/HasteDependencyResolver-test.js @@ -10,7 +10,8 @@ jest.dontMock('../') .dontMock('q') - .dontMock('../replacePatterns'); + .dontMock('../replacePatterns') + .setMock('chalk', { dim: function(s) { return s; } }); jest.mock('path'); diff --git a/react-packager/src/Packager/__tests__/Packager-test.js b/react-packager/src/Packager/__tests__/Packager-test.js index 216e9009..00c76870 100644 --- a/react-packager/src/Packager/__tests__/Packager-test.js +++ b/react-packager/src/Packager/__tests__/Packager-test.js @@ -13,7 +13,8 @@ jest .dontMock('underscore') .dontMock('../../lib/ModuleTransport') .setMock('uglify-js') - .dontMock('../'); + .dontMock('../') + .setMock('chalk', { dim: function(s) { return s; } }); jest.mock('fs'); diff --git a/react-packager/src/Server/__tests__/Server-test.js b/react-packager/src/Server/__tests__/Server-test.js index 7d399cb2..f0761d31 100644 --- a/react-packager/src/Server/__tests__/Server-test.js +++ b/react-packager/src/Server/__tests__/Server-test.js @@ -18,7 +18,8 @@ jest.setMock('worker-farm', function() { return function() {}; }) } }) .setMock('uglify-js') - .dontMock('../'); + .dontMock('../') + .setMock('chalk', { dim: function(s) { return s; } }); var Promise = require('promise');