Skip to content

Conversation

@onebytegone
Copy link
Contributor

No description provided.

@onebytegone onebytegone requested a review from yokuze November 18, 2025 22:55
@coveralls
Copy link

coveralls commented Nov 18, 2025

Coverage Status

coverage: 98.389% (-0.3%) from 98.663%
when pulling f936fe0 on async-handler
into a7b6c54 on master.

@onebytegone onebytegone requested review from nduthoit and removed request for yokuze December 12, 2025 12:50
src/index.ts Outdated
* ```
*/
export function createAsyncHandler(app: Application): (event: RequestEvent, context: Context) => Promise<ResponseResult> {
return async (event: RequestEvent, context: Context): Promise<ResponseResult> => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The async keyword is unnecessary since runAsync() already returns a Promise.

Suggested change
return async (event: RequestEvent, context: Context): Promise<ResponseResult> => {
return (event: RequestEvent, context: Context): Promise<ResponseResult> => {

expect(result.multiValueHeaders['Content-Type']).to.eql([ 'application/json; charset=utf-8' ]);
});

it('returns a Promise that rejects when an error occurs', async () => {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
it('returns a Promise that rejects when an error occurs', async () => {
it('returns a Promise that resolves when an error occurs', async () => {

Copy link

@nduthoit nduthoit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@onebytegone onebytegone merged commit da5a298 into master Dec 21, 2025
12 of 18 checks passed
@onebytegone onebytegone deleted the async-handler branch December 21, 2025 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants