Skip to content

Instantly share code, notes, and snippets.

@ffMathy
Created August 22, 2018 20:31
Show Gist options
  • Save ffMathy/2e1db35864732dabec09a4e02cac0b33 to your computer and use it in GitHub Desktop.
Save ffMathy/2e1db35864732dabec09a4e02cac0b33 to your computer and use it in GitHub Desktop.
const mockedCalculator = mock(RealCalculator);
const calculator = instance(mockedCalculator);
calculator.add(3, 4);
verify(mockedCalculator.add(1, 2)).called();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment