Skip to content

Commit 961c784

Browse files
committed
update node-compat test
1 parent 373a5bd commit 961c784

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

server/routes/api/node-compat.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,12 @@ export default eventHandler(async (event) => {
3838
const results: Record<string, boolean> = {};
3939
for (const [group, groupTests] of Object.entries(nodeCompatTests)) {
4040
for (const [name, test] of Object.entries(groupTests)) {
41-
results[`${group}:${name}`] = !!(await test());
41+
try {
42+
results[`${group}:${name}`] = !!(await test());
43+
} catch (error) {
44+
console.error(`Failed test ${group}:${name}`, error);
45+
results[`${group}:${name}`] = false;
46+
}
4247
}
4348
}
4449
return new Response(JSON.stringify(results, null, 2), {

0 commit comments

Comments
 (0)