Get the identifying information for the spy.
Tell the spy to call a fake implementation when invoked.
Name | Type | Description |
---|---|---|
fn | function | The function to invoke with the passed parameters. |
Tell the spy to call through to the real implementation when invoked.
Execute the current spy strategy.
Tell the spy to return the value when invoked.
Name | Type | Description |
---|---|---|
value | * | The value to return. |
Tell the spy to return one of the specified values (sequentially) each time the spy is invoked.
Name | Type | Attributes | Description |
---|---|---|---|
values | * | <repeatable> | Values to be returned on subsequent calls to the spy. |
Tell the spy to do nothing when invoked. This is the default.
Tell the spy to throw an error when invoked.
Name | Type | Description |
---|---|---|
something | Error | String | Thing to throw |
© 2008–2017 Pivotal Labs
Licensed under the MIT License.
https://jasmine.github.io/api/3.2/SpyStrategy.html