Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
| "@vue/test-utils": "2.4.6", | ||
| "axe-core": "4.11.1", | ||
| "fast-check": "4.5.3", | ||
| "h3": "1.15.5", |
There was a problem hiding this comment.
its a transitive dependency but we need it as a direct devDependency for sake of resolving types in tests
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
📝 WalkthroughWalkthroughThis pull request adds the H3 package (version 1.15.5) to package.json as a development dependency and introduces a new unit test file at test/unit/server/utils/error-handler.spec.ts. The test suite covers handleApiError behaviour: re-throwing existing H3 errors, converting valibot validation errors to a 404 using the first issue message, returning provided fallback errors with their statusCode and message, defaulting fallback statusCode to 502 when absent, and honouring a custom fallback statusCode when supplied. 🚥 Pre-merge checks | ❌ 1❌ Failed checks (1 warning)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Comment |
| let valibotError: unknown | ||
| try { | ||
| v.parse(schema, { name: '' }) | ||
| } catch (e) { | ||
| valibotError = e | ||
| } |
There was a problem hiding this comment.
I really wanted to use safe parse and construct the v.ValiError yourself but it somehow feels like more work 🫠
No description provided.