Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it(`should navigate to Crowdsales List`, async () => {
// Given
const wrapper = mount(
)
const chooseCrowdsaleComponentWrapper = wrapper.find(ChooseCrowdsale)
const instance = chooseCrowdsaleComponentWrapper.instance()
const goToCrowdsalesHandler = jest.spyOn(instance, 'goToCrowdsales')
instance.forceUpdate()
storage.clearAll()
// When
const chooseCrowdsale = chooseCrowdsaleComponentWrapper.find('.hm-Home_BtnChoose')
chooseCrowdsale.simulate('click')
// Then
expect(chooseCrowdsale.length).toBe(1)
expect(goToCrowdsalesHandler).toHaveBeenCalledTimes(1)
expect(goToCrowdsalesHandler).toHaveBeenCalledWith()
})
})