Browse Source

test: fix CI

pull/7241/head
Benjy Cui 7 years ago
parent
commit
e061ada71a
  1. 10
      components/auto-complete/__tests__/ac.test.js
  2. 2
      components/notification/__tests__/placement.test.js

10
components/auto-complete/__tests__/ac.test.js

@ -17,4 +17,14 @@ describe('AutoComplete with Custom Input Element Render', () => {
// should not filter data source defaultly
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();
});
});

2
components/notification/__tests__/placement.test.js

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

Loading…
Cancel
Save