mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-04 21:18:01 +08:00
f6f5fb3672
* Add test case * fix test case
16 lines
496 B
JavaScript
16 lines
496 B
JavaScript
const warnSpy = jest.spyOn(console, 'warn').mockImplementation(() => {});
|
|
const antd = require('..');
|
|
|
|
describe('antd', () => {
|
|
it('exports modules correctly', () => {
|
|
expect(Object.keys(antd)).toMatchSnapshot();
|
|
});
|
|
|
|
it('should hint when import all components', () => {
|
|
expect(warnSpy).toBeCalledWith(
|
|
'You are using a whole package of antd, please use https://www.npmjs.com/package/babel-plugin-import to reduce app bundle size.'
|
|
);
|
|
warnSpy.mockRestore();
|
|
});
|
|
});
|