test: fix CI

This commit is contained in:
Benjy Cui 2017-08-17 15:33:26 +08:00
parent 9abce572a4
commit e061ada71a
2 changed files with 12 additions and 0 deletions

View File

@ -17,4 +17,14 @@ describe('AutoComplete with Custom Input Element Render', () => {
// should not filter data source defaultly // should not filter data source defaultly
expect(dropdownWrapper.find('MenuItem').length).toBe(3); expect(dropdownWrapper.find('MenuItem').length).toBe(3);
}); });
it('child.ref should work', () => {
const mockRef = jest.fn();
mount(
<AutoComplete dataSource={[]}>
<input ref={mockRef} />
</AutoComplete>
);
expect(mockRef).toHaveBeenCalled();
});
}); });

View File

@ -1,6 +1,8 @@
import notification from '..'; import notification from '..';
describe('Notification.placement', () => { describe('Notification.placement', () => {
afterEach(() => notification.destroy());
function $$(className) { function $$(className) {
return document.body.querySelectorAll(className); return document.body.querySelectorAll(className);
} }