Fix missing Tag component in built package and add test case, close #1638

This commit is contained in:
afc163 2016-05-11 15:29:08 +08:00
parent 2d513ae576
commit c5af3dcc7c
2 changed files with 58 additions and 2 deletions

View File

@ -2,7 +2,7 @@
// this file is not used if use https://github.com/ant-design/babel-plugin-antd // this file is not used if use https://github.com/ant-design/babel-plugin-antd
import { import {
Rate, Affix, DatePicker, Tooltip, Carousel, Tabs, Modal, Dropdown, Progress, Popover, Select, Rate, Affix, DatePicker, Tooltip, Tag, Carousel, Tabs, Modal, Dropdown, Progress, Popover, Select,
Breadcrumb, Popconfirm, Pagination, Steps, InputNumber, Switch, Checkbox, Table, Collapse, message, Breadcrumb, Popconfirm, Pagination, Steps, InputNumber, Switch, Checkbox, Table, Collapse, message,
Slider, QueueAnim, Radio, notification, Alert, Validation, Tree, TreeSelect, Upload, Slider, QueueAnim, Radio, notification, Alert, Validation, Tree, TreeSelect, Upload,
Badge, Menu, Timeline, Button, Icon, Row, Col, Spin, Form, Input, Calendar, TimePicker, Badge, Menu, Timeline, Button, Icon, Row, Col, Spin, Form, Input, Calendar, TimePicker,
@ -11,7 +11,7 @@ import {
// copy from above // copy from above
const antd = { const antd = {
Rate, Affix, DatePicker, Tooltip, Carousel, Tabs, Modal, Dropdown, Progress, Popover, Select, Rate, Affix, DatePicker, Tooltip, Tag, Carousel, Tabs, Modal, Dropdown, Progress, Popover, Select,
Breadcrumb, Popconfirm, Pagination, Steps, InputNumber, Switch, Checkbox, Table, Collapse, message, Breadcrumb, Popconfirm, Pagination, Steps, InputNumber, Switch, Checkbox, Table, Collapse, message,
Slider, QueueAnim, Radio, notification, Alert, Validation, Tree, TreeSelect, Upload, Slider, QueueAnim, Radio, notification, Alert, Validation, Tree, TreeSelect, Upload,
Badge, Menu, Timeline, Button, Icon, Row, Col, Spin, Form, Input, Calendar, TimePicker, Badge, Menu, Timeline, Button, Icon, Row, Col, Spin, Form, Input, Calendar, TimePicker,

56
tests/index.test.js Normal file
View File

@ -0,0 +1,56 @@
jest.unmock('../index');
import React from 'react';
import antd from '../index';
describe('Icon', function() {
it('should has modules in antd', () => {
expect('Affix' in antd).toBeTruthy();
expect('Alert' in antd).toBeTruthy();
expect('Badge' in antd).toBeTruthy();
expect('Breadcrumb' in antd).toBeTruthy();
expect('Button' in antd).toBeTruthy();
expect('Calendar' in antd).toBeTruthy();
expect('Card' in antd).toBeTruthy();
expect('Carousel' in antd).toBeTruthy();
expect('Cascader' in antd).toBeTruthy();
expect('Checkbox' in antd).toBeTruthy();
expect('Col' in antd).toBeTruthy();
expect('Collapse' in antd).toBeTruthy();
expect('DatePicker' in antd).toBeTruthy();
expect('Dropdown' in antd).toBeTruthy();
expect('Form' in antd).toBeTruthy();
expect('Icon' in antd).toBeTruthy();
expect('Input' in antd).toBeTruthy();
expect('InputNumber' in antd).toBeTruthy();
expect('LocaleProvider' in antd).toBeTruthy();
expect('Menu' in antd).toBeTruthy();
expect('message' in antd).toBeTruthy();
expect('Modal' in antd).toBeTruthy();
expect('notification' in antd).toBeTruthy();
expect('Pagination' in antd).toBeTruthy();
expect('Popconfirm' in antd).toBeTruthy();
expect('Popover' in antd).toBeTruthy();
expect('Progress' in antd).toBeTruthy();
expect('QueueAnim' in antd).toBeTruthy();
expect('Radio' in antd).toBeTruthy();
expect('Rate' in antd).toBeTruthy();
expect('Row' in antd).toBeTruthy();
expect('Select' in antd).toBeTruthy();
expect('Slider' in antd).toBeTruthy();
expect('Spin' in antd).toBeTruthy();
expect('Steps' in antd).toBeTruthy();
expect('Switch' in antd).toBeTruthy();
expect('Table' in antd).toBeTruthy();
expect('Tabs' in antd).toBeTruthy();
expect('Tag' in antd).toBeTruthy();
expect('TimePicker' in antd).toBeTruthy();
expect('Timeline' in antd).toBeTruthy();
expect('Tooltip' in antd).toBeTruthy();
expect('Transfer' in antd).toBeTruthy();
expect('Tree' in antd).toBeTruthy();
expect('TreeSelect' in antd).toBeTruthy();
expect('Upload' in antd).toBeTruthy();
expect('Validation' in antd).toBeTruthy();
});
});