Created
August 22, 2018 20:32
-
-
Save ffMathy/3e94d74af22e2ebef24d7194d8142335 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 = TypeMoq.Mock.ofType(RealCalculator); | |
const calculator = mockedCalculator.object; | |
mockedCalculator.setup(x => x.add(1, 2)).returns(console.log); | |
calculator.add(1, 2); //will call console.log(1, 2); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment