Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes
Browse files Browse the repository at this point in the history
magne4000 committed Aug 17, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent c9af0d4 commit 1c923ac
Showing 3 changed files with 13 additions and 10 deletions.
1 change: 1 addition & 0 deletions packages/adapter-express/src/common.ts
Original file line number Diff line number Diff line change
@@ -151,6 +151,7 @@ export function createMiddleware<
await sendResponse(response, res);
} else {
req[contextSymbol] = response;
return next?.();
}
} catch (error) {
if (next) {
1 change: 1 addition & 0 deletions packages/adapter-webroute/tests/entry-webroute.ts
Original file line number Diff line number Diff line change
@@ -22,6 +22,7 @@ type M1 = MiddlewareFactoryDataResult<typeof m1>;
type M3 = MiddlewareFactoryDataResult<typeof m3>;

const router = route()
// `createMiddleware(m1)()` or `m1()` should roughly be equivelant. The former allows better control over typings
.use(m1())
.use((_request, ctx) => {
console.log("something BEFORE", ctx.state.something);
21 changes: 11 additions & 10 deletions packages/adapter-webroute/tests/webroute.spec.ts
Original file line number Diff line number Diff line change
@@ -4,16 +4,17 @@ import * as vitest from "vitest";
let port = 3300;

const runs: Run[] = [
{
name: "adapter-webroute: node",
command: "pnpm run test:run-webroute:node",
port: port++,
},
{
name: "adapter-webroute: bun",
command: "pnpm run test:run-webroute:bun",
port: port++,
},
// Waiting for fix https://github.com/sinclairnick/webroute/pull/40
// {
// name: "adapter-webroute: node",
// command: "pnpm run test:run-webroute:node",
// port: port++,
// },
// {
// name: "adapter-webroute: bun",
// command: "pnpm run test:run-webroute:bun",
// port: port++,
// },
{
name: "adapter-webroute: deno",
command: "pnpm run test:run-webroute:deno",

0 comments on commit 1c923ac

Please sign in to comment.