Tools/jasmine

[Jasmine] Spies

리딩리드 2016. 7. 29. 13:42

Spies

- We want to be able to check if functions have been called so We use it Spies

- It lets you spy on pieces of your program


1. spyOn()

1_1 src


1_2. spec

 

- This will spy on this fake person's sayHello() method.