SIGN IN SIGN UP
honojs / hono UNCLAIMED

Web framework built on Web Standards

0 0 77 TypeScript

refactor(language): Test/improve tests on languages middleware (#4980)

* test(language): add some tests on the language-middleware

* feat: remove unreachable code
- detectFromQuery: c.req.query shouldn't throw and normalizeLanguage already has a try/catch that return undefined
- detectFromCookie: getCookie shoundn't throw and normalizeLanguage already has a try/catch that return undefined

* feat: remove unreachable code

- language detector: remove redundant guards and fallback catches handled by detector validation and normalizeLanguage

* feat: remove unreachable code
- detectLanguage: detector shouldn't be undefined because options are validated before detection

* feat: remove unreachable code
- languageDetector: detectLanguage shouldn't throw because detector errors are already handled internally
V
Valère committed
8e2cccc2fb3899519e43c774d0626cebaf79fe5a
Parent: 413d3cb
Committed by GitHub <noreply@github.com> on 6/1/2026, 1:39:51 AM