From d594ef506d1efe2fea15f8f39099d19b39436b71 Mon Sep 17 00:00:00 2001 From: Denis Postu Date: Thu, 3 Mar 2016 23:50:35 +0100 Subject: [PATCH] Added missing 'returnValue' to jasmine.CallInfo --- jasmine/jasmine-tests.ts | 6 +++--- jasmine/jasmine.d.ts | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/jasmine/jasmine-tests.ts b/jasmine/jasmine-tests.ts index 203165538b..1145874468 100644 --- a/jasmine/jasmine-tests.ts +++ b/jasmine/jasmine-tests.ts @@ -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 () { diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts index 50679d86da..f04bb2a9f7 100644 --- a/jasmine/jasmine.d.ts +++ b/jasmine/jasmine.d.ts @@ -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 {