test: Add test case for components/index.tsx (#4450)

This commit is contained in:
偏右 2017-01-03 16:15:05 +08:00 committed by Benjy Cui
parent 29e598a3f3
commit 15b81d7ec8
2 changed files with 57 additions and 0 deletions

View File

@ -52,3 +52,58 @@ Array [
"Upload",
]
`;
exports[`antd dist files exports modules correctly 2`] = `
Array [
"Affix",
"Anchor",
"AutoComplete",
"Alert",
"BackTop",
"Badge",
"Breadcrumb",
"Button",
"Calendar",
"Card",
"Collapse",
"Carousel",
"Cascader",
"Checkbox",
"Col",
"DatePicker",
"Dropdown",
"Form",
"Icon",
"Input",
"InputNumber",
"Layout",
"LocaleProvider",
"message",
"Menu",
"Modal",
"notification",
"Pagination",
"Popconfirm",
"Popover",
"Progress",
"Radio",
"Rate",
"Row",
"Select",
"Slider",
"Spin",
"Steps",
"Switch",
"Table",
"Transfer",
"Tree",
"TreeSelect",
"Tabs",
"Tag",
"TimePicker",
"Timeline",
"Tooltip",
"Mention",
"Upload",
]
`;

View File

@ -10,11 +10,13 @@ describe('antd dist files', () => {
}
const antd = require('../dist/antd'); // eslint-disable-line global-require
const antdInComponents = require('../components/'); // eslint-disable-line global-require
// https://github.com/ant-design/ant-design/issues/1638
// https://github.com/ant-design/ant-design/issues/1968
it('exports modules correctly', () => {
expect(Object.keys(antd)).toMatchSnapshot();
expect(Object.keys(antdInComponents)).toMatchSnapshot();
});
// https://github.com/ant-design/ant-design/issues/1970