Skip to content

Commit efea91e

Browse files
test: stability
1 parent 8e273d1 commit efea91e

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"build:types": "tsc --declaration --emitDeclarationOnly --outDir types && prettier \"types/**/*.ts\" --write",
3939
"build:code": "babel src -d dist --copy-files",
4040
"build": "npm-run-all -p \"build:**\"",
41-
"test:only": "node --trace-deprecation node_modules/.bin/jest",
41+
"test:only": "jest",
4242
"test:watch": "npm run test:only -- --watch",
4343
"test:coverage": "npm run test:only -- --collectCoverageFrom=\"src/**/*.js\" --coverage",
4444
"pretest": "npm run lint",

test/middleware.test.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,13 @@ async function frameworkFactory(
131131
case "hono": {
132132
// eslint-disable-next-line new-cap
133133
const app = new framework();
134+
app.onError((err, c) => {
135+
console.error("--- HONO ERROR STACK START ---");
136+
console.error(err.stack || err);
137+
console.error("--- HONO ERROR STACK END ---");
138+
139+
return c.text("Internal Server Error", 500);
140+
});
134141
const server = await startServer(name, app);
135142
const req = request(server);
136143
const instance = middleware.honoWrapper(compiler, devMiddlewareOptions);

0 commit comments

Comments
 (0)