Answers for "angular9 spy"

0

angular9 spy

it("should be able to upper case a string", function () {
var  spytoUpperCase  =  spyOn(String.prototype, 'toUpperCase')
expect(utils.toUpperCase).toBeDefined();
expect(utils.toUpperCase("hello world")).toEqual("HELLO WORLD");
expect(String.prototype.toUpperCase).toHaveBeenCalled();
expect(spytoUpperCase.calls.count()).toEqual(1);
});
Posted by: Guest on June-08-2020

Code answers related to "angular9 spy"

Code answers related to "Javascript"

Browse Popular Code Answers by Language