Skip to content

Commit

Permalink
fix: Make Test.then() parameters optional.
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Walton committed Mar 20, 2019
1 parent 34a38da commit cdb35e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ export default class Test implements PromiseLike<fetch.Response> {
* 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) {
Expand Down

0 comments on commit cdb35e6

Please sign in to comment.