Skip to content

Instantly share code, notes, and snippets.

@ffMathy
Created August 22, 2018 20:33
Show Gist options
  • Save ffMathy/24d8e649063b5e0b0ac0051bb09e5ebc to your computer and use it in GitHub Desktop.
Save ffMathy/24d8e649063b5e0b0ac0051bb09e5ebc to your computer and use it in GitHub Desktop.
const mockedCalculator = Substitute.for<RealCalculator>();
mockedCalculator.add.mimicks(console.log);
mockedCalculator.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