Skip to content

Commit

Permalink
ts-error should have description
Browse files Browse the repository at this point in the history
  • Loading branch information
kwhitley committed Nov 25, 2023
1 parent aead16c commit ab1364f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
5 changes: 1 addition & 4 deletions src/flow.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,7 @@ describe('flow(router: RouterType, options: FlowOptions): RequestHandler', () =>
})

it('if set to false, will not add notFound handler (allow undefined passthrough)', async () => {
let response = await flow(router, {
notFound: false,
// format: false,
})(request('/missing'))
let response = await flow(router, { notFound: false })(request('/missing'))

expect(response).toBe(undefined)
})
Expand Down
2 changes: 1 addition & 1 deletion src/flow.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export const flow = (router: RouterType, options: FlowOptions = {}) => {
}

return async (...args: any[]) => {
// @ts-expect-error
// @ts-expect-error - nothing wrong with this
let response = router.handle(...args)
response = format ? response.then(v => v === undefined ? v : format(v)) : response
// @ts-expect-error - add optional error handling
Expand Down

0 comments on commit ab1364f

Please sign in to comment.