Skip to content

Commit

Permalink
chore: use looser type for Brittle's teardown function (#464)
Browse files Browse the repository at this point in the history
`t.teardown` [doesn't care about the return type of its callback][0] so
I updated the types to match.

[0]: https://github.com/holepunchto/brittle/blob/8926893862dc1ecf9a213fedf2306f24fe47b8cc/index.js#L640
  • Loading branch information
EvanHahn authored Feb 5, 2024
1 parent a301b75 commit 430eeff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/brittle.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ declare module 'brittle' {

export interface TestInstance extends Assertion {
plan(n: number): void
teardown(fn: () => void | Promise<void>, options?: { order?: number }): void
teardown(fn: () => unknown | Promise<unknown>, options?: { order?: number }): void
timeout(ms: number): void
comment(message: string): void
end(): void
Expand Down

0 comments on commit 430eeff

Please sign in to comment.