Created
February 25, 2019 16:08
-
-
Save niinpatel/1830dc3afb2a40321b1cb2b01d98a17e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import useCustomEffect from '../useCustomEffect'; | |
import testHook from '../testHook'; | |
import sideEffect from 'sideeffect'; | |
jest.mock('sideeffect') | |
describe('useCustomEffect', () => { | |
test('should call side effect', () => { | |
testHook(useCustomEffect); | |
expect(sideEffect).toHaveBeenCalledTimes(1); | |
}); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment