Added missing 'returnValue' to jasmine.CallInfo

This commit is contained in:
Denis Postu
2016-03-03 23:50:35 +01:00
parent ba4c4fc6c9
commit d594ef506d
2 changed files with 5 additions and 3 deletions
+3 -3
View File
@@ -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 () {
+2
View File
@@ -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 {