Add missing unit tests for PR #5499 (#5527)

Part of #5410
This commit is contained in:
Kaan Kabalak
2018-02-16 19:45:32 -08:00
committed by Harshavardhana
parent 44f8f7059c
commit 566ac78b8b
8 changed files with 139 additions and 1 deletions
@@ -23,5 +23,10 @@ describe("SideBar", () => {
shallow(<SideBar />)
})
// ClickOutHandler test to be added when corresponding function is added
it("should call clickOutside when the user clicks outside the sidebar", () => {
const clickOutside = jest.fn()
const wrapper = shallow(<SideBar clickOutside={clickOutside} />)
wrapper.simulate("clickOut", { preventDefault: jest.fn() })
expect(clickOutside).toHaveBeenCalled()
})
})