test: add test case for calendar locale prop

This commit is contained in:
afc163 2018-10-19 23:54:10 +08:00
parent e03a4e166b
commit cb24060955
2 changed files with 1046 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -98,4 +98,13 @@ describe('Calendar', () => {
expect(wrapper.state().mode).toEqual(monthMode);
expect(onPanelChangeStub).toHaveBeenCalledTimes(1);
});
it('Calendar should support locale', () => {
// eslint-disable-next-line
const zhCN = require('../locale/zh_CN').default;
const wrapper = mount(
<Calendar locale={zhCN} />
);
expect(wrapper.render()).toMatchSnapshot();
});
});