[react-packager] Fix OSS tests
This commit is contained in:
parent
a008704b51
commit
9ba4697f02
|
@ -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,
|
||||
};
|
||||
|
|
|
@ -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
|
||||
]);
|
||||
|
||||
|
|
Loading…
Reference in New Issue