angular-cn/public/docs/js/latest/api/test/GuinessCompatibleSpy-interf...

63 lines
956 B
Plaintext
Raw Normal View History

p.location-badge.
exported from <a href='../test'>angular2/test</a>
2015-07-30 14:19:45 -04:00
defined in <a href="https://github.com/angular/angular/tree/2.0.0-alpha.32/modules/angular2/src/test_lib/test_lib.ts#L301-L312">angular2/src/test_lib/test_lib.ts (line 301)</a>
:markdown
.l-main-section
h2 Members
.l-sub-section
h3 andReturn
pre.prettyprint
code.
andReturn(val: any)
:markdown
By chaining the spy with and.returnValue, all calls to the function will return a specific
value.
.l-sub-section
h3 andCallFake
pre.prettyprint
code.
andCallFake(fn: Function)
:markdown
By chaining the spy with and.callFake, all calls to the spy will delegate to the supplied
function.
.l-sub-section
h3 reset
pre.prettyprint
code.
reset()
:markdown
removes all recorded calls