Created
August 22, 2018 20:30
-
-
Save ffMathy/429eb20423c9008b5932f5b431e1cab8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
const mockedCalculator = mock(RealCalculator); | |
const calculator = instance(mockedCalculator); | |
calculator.add(1, 2); | |
verify(mockedCalculator.add(1, 2)).once(); //called exactly once | |
verify(mockedCalculator.add(1, 2)).atLeast(0); //called at least once |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment