[react-packager] Fix OSS tests

This commit is contained in:
Martín Bigio 2015-08-24 18:56:39 -07:00
parent a008704b51
commit 9ba4697f02
2 changed files with 22 additions and 3 deletions

View File

@ -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,
};

View File

@ -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
]);