Add a button text test

This commit is contained in:
afc163 2015-12-06 16:43:48 +08:00
parent 7c9820baeb
commit 2ea366c16c

View File

@ -22,5 +22,13 @@ describe('Button', function() {
it('should set the default className to button', () => { it('should set the default className to button', () => {
expect(buttonNode.className).toBe('ant-btn'); expect(buttonNode.className).toBe('ant-btn');
}); });
it('should has a whitespace in two Chinese charactor', () => {
button = TestUtils.renderIntoDocument(
<Button>按钮</Button>
);
buttonNode = TestUtils.findRenderedDOMComponentWithTag(button, 'button');
expect(buttonNode.textContent).toBe('按 钮');
});
}); });