-
-
Save qunabu/5e8d268ca9b0cf6dd7cc45b14e361537 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
it("should multiply the number passed as parameter and subtract one", () => { | |
const multiplySpy = spyOn(Calculator, "multiple").and.callThrough(); | |
const subtractSpy = spyOn(Calculator, "subtract").and.callThrough(); | |
const result = Calculator.compute(21.5); | |
expect(multiplySpy).toHaveBeenCalledWith(21.5, 2); | |
expect(subtractSpy).toHaveBeenCalledWith(43, 1); | |
expect(result).toBe(42); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment