偏右
7 years ago
committed by
GitHub
2 changed files with 9 additions and 2 deletions
@ -1,7 +1,15 @@ |
|||
import * as antd from '..'; |
|||
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(); |
|||
}); |
|||
}); |
|||
|
Loading…
Reference in new issue