From cdb35e63d8849d022f136289148a0044d479b8b2 Mon Sep 17 00:00:00 2001 From: Jason Walton Date: Wed, 20 Mar 2019 13:43:49 -0400 Subject: [PATCH] fix: Make `Test.then()` parameters optional. --- src/Test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Test.ts b/src/Test.ts index 9a74d89..446cdf1 100644 --- a/src/Test.ts +++ b/src/Test.ts @@ -272,8 +272,8 @@ export default class Test implements PromiseLike { * Tests are 'thennable', so you can treat them like a Promise and get back * the WHAT-WG fetch response. */ - then(a: (res: fetch.Response) => any, b: (err: Error) => any) { - return this.end().then(a,b); + then(onfulfilled?: (res: fetch.Response) => any, onrejected?: (err: Error) => any) { + return this.end().then(onfulfilled, onrejected); } private _should(message: string) {