From e061ada71a9e25627b15c022822d8675b80c02ed Mon Sep 17 00:00:00 2001 From: Benjy Cui Date: Thu, 17 Aug 2017 15:33:26 +0800 Subject: [PATCH] test: fix CI --- components/auto-complete/__tests__/ac.test.js | 10 ++++++++++ components/notification/__tests__/placement.test.js | 2 ++ 2 files changed, 12 insertions(+) diff --git a/components/auto-complete/__tests__/ac.test.js b/components/auto-complete/__tests__/ac.test.js index 7b919184f0..a846726e63 100644 --- a/components/auto-complete/__tests__/ac.test.js +++ b/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( + + + + ); + expect(mockRef).toHaveBeenCalled(); + }); }); diff --git a/components/notification/__tests__/placement.test.js b/components/notification/__tests__/placement.test.js index aeb55011fe..f533610ee2 100644 --- a/components/notification/__tests__/placement.test.js +++ b/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); }