angular9 spy

Solutions on MaxInterview for angular9 spy by the best coders in the world

showing results for - "angular9 spy"
Giuseppe
23 Nov 2017
1it("should be able to upper case a string", function () {
2var  spytoUpperCase  =  spyOn(String.prototype, 'toUpperCase')
3expect(utils.toUpperCase).toBeDefined();
4expect(utils.toUpperCase("hello world")).toEqual("HELLO WORLD");
5expect(String.prototype.toUpperCase).toHaveBeenCalled();
6expect(spytoUpperCase.calls.count()).toEqual(1);
7});
8