Created
September 25, 2018 19:29
-
-
Save techiediaries/38ebf58edbea4904980565705cb73d1b 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 be able to upper case a string", function () { | |
| var spytoUpperCase = spyOn(String.prototype, 'toUpperCase').and.callThrough(); | |
| expect(utils.toUpperCase).toBeDefined(); | |
| expect(utils.toUpperCase("hello world")).toEqual("HELLO WORLD"); | |
| expect(String.prototype.toUpperCase).toHaveBeenCalled(); | |
| expect(spytoUpperCase.calls.count()).toEqual(1); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment