diff --git a/react-packager/src/Activity/__mocks__/chalk.js b/react-packager/src/Activity/__mocks__/chalk.js index 961d8558..1376f275 100644 --- a/react-packager/src/Activity/__mocks__/chalk.js +++ b/react-packager/src/Activity/__mocks__/chalk.js @@ -8,7 +8,26 @@ */ 'use strict'; +const mockColor = () => { + return { + bold: () => { return { }; }, + }; +}; + +mockColor.bold = function() { + return {}; +}; + module.exports = { dim: s => s, - blue: {bold: {}}, + magenta: mockColor, + white: mockColor, + blue: mockColor, + yellow: mockColor, + green: mockColor, + bold: mockColor, + red: mockColor, + cyan: mockColor, + gray: mockColor, + black: mockColor, }; diff --git a/react-packager/src/Bundler/__tests__/Bundler-test.js b/react-packager/src/Bundler/__tests__/Bundler-test.js index f79292c0..250e31a9 100644 --- a/react-packager/src/Bundler/__tests__/Bundler-test.js +++ b/react-packager/src/Bundler/__tests__/Bundler-test.js @@ -217,11 +217,11 @@ describe('Bundler', function() { {runMainModule: true} ]); - expect(p.addAsset.mock.calls[0]).toEqual([ + expect(p.addAsset.mock.calls).toContain([ imgModule_DEPRECATED ]); - expect(p.addAsset.mock.calls[1]).toEqual([ + expect(p.addAsset.mock.calls).toContain([ imgModule ]);