mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
Added missing 'returnValue' to jasmine.CallInfo
This commit is contained in:
@@ -512,21 +512,21 @@ describe("A spy", function () {
|
||||
it("can provide the context and arguments to all calls", function () {
|
||||
foo.setBar(123);
|
||||
|
||||
expect(foo.setBar.calls.all()).toEqual([{ object: foo, args: [123] }]);
|
||||
expect(foo.setBar.calls.all()).toEqual([{ object: foo, args: [123], returnValue: undefined }]);
|
||||
});
|
||||
|
||||
it("has a shortcut to the most recent call", function () {
|
||||
foo.setBar(123);
|
||||
foo.setBar(456, "baz");
|
||||
|
||||
expect(foo.setBar.calls.mostRecent()).toEqual({ object: foo, args: [456, "baz"] });
|
||||
expect(foo.setBar.calls.mostRecent()).toEqual({ object: foo, args: [456, "baz"], returnValue: undefined });
|
||||
});
|
||||
|
||||
it("has a shortcut to the first call", function () {
|
||||
foo.setBar(123);
|
||||
foo.setBar(456, "baz");
|
||||
|
||||
expect(foo.setBar.calls.first()).toEqual({ object: foo, args: [123] });
|
||||
expect(foo.setBar.calls.first()).toEqual({ object: foo, args: [123], returnValue: undefined });
|
||||
});
|
||||
|
||||
it("can be reset", function () {
|
||||
|
||||
Vendored
+2
@@ -456,6 +456,8 @@ declare module jasmine {
|
||||
object: any;
|
||||
/** All arguments passed to the call */
|
||||
args: any[];
|
||||
/** The return value of the call */
|
||||
returnValue: any;
|
||||
}
|
||||
|
||||
interface Util {
|
||||
|
||||
Reference in New Issue
Block a user