mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-19 05:03:32 +08:00
Merge pull request #8375 from DenisPostu/master
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 () {
|
||||
|
||||
2
jasmine/jasmine.d.ts
vendored
2
jasmine/jasmine.d.ts
vendored
@@ -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