create-shibumi 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-shibumi",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "Scaffold a Shibumi Stack project: Bun, Hono, Zod, Drizzle, SQLite, Alpine",
5
5
  "type": "module",
6
6
  "bin": {
@@ -84,9 +84,17 @@ describe("routes", () => {
84
84
  probe.get("/__boom", () => {
85
85
  throw new Error("test explosion");
86
86
  });
87
- const res = await probe.fetch(new Request("http://localhost/__boom"));
88
- expect(res.status).toBe(500);
89
- expectSecurityHeaders(res);
87
+ // onError logs the exception before answering; silence it so the
88
+ // deliberate explosion does not read as a failure in test output.
89
+ const errorLog = console.error;
90
+ console.error = () => {};
91
+ try {
92
+ const res = await probe.fetch(new Request("http://localhost/__boom"));
93
+ expect(res.status).toBe(500);
94
+ expectSecurityHeaders(res);
95
+ } finally {
96
+ console.error = errorLog;
97
+ }
90
98
  });
91
99
  });
92
100
 
@@ -73,9 +73,17 @@ describe("routes", () => {
73
73
  probe.get("/__boom", () => {
74
74
  throw new Error("test explosion");
75
75
  });
76
- const res = await probe.fetch(new Request("http://localhost/__boom"));
77
- expect(res.status).toBe(500);
78
- expectSecurityHeaders(res);
76
+ // onError logs the exception before answering; silence it so the
77
+ // deliberate explosion does not read as a failure in test output.
78
+ const errorLog = console.error;
79
+ console.error = () => {};
80
+ try {
81
+ const res = await probe.fetch(new Request("http://localhost/__boom"));
82
+ expect(res.status).toBe(500);
83
+ expectSecurityHeaders(res);
84
+ } finally {
85
+ console.error = errorLog;
86
+ }
79
87
  });
80
88
  });
81
89