You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
658 B
27 lines
658 B
9 years ago
|
jest.dontMock('../components/button/button');
|
||
|
|
||
|
import React from 'react';
|
||
|
import TestUtils from 'react-addons-test-utils';
|
||
|
const Button = require('../components/button/button');
|
||
|
|
||
|
describe('Button', function() {
|
||
|
let button;
|
||
|
let buttonNode;
|
||
|
|
||
|
beforeEach(() => {
|
||
|
button = TestUtils.renderIntoDocument(
|
||
|
<Button>Follow</Button>
|
||
|
);
|
||
|
buttonNode = TestUtils.findRenderedDOMComponentWithTag(button, 'button');
|
||
|
});
|
||
|
|
||
|
it('should set the type to button by default', () => {
|
||
|
expect(buttonNode.type).toBe('button');
|
||
|
});
|
||
|
|
||
|
it('should set the default className to button', () => {
|
||
|
expect(buttonNode.className).toBe('ant-btn');
|
||
|
});
|
||
|
});
|
||
|
|