Closed AndyOGo closed 5 years ago
Express Request provides acceptsLanguages(). https://github.com/expressjs/express/blob/e1b45ebd050b6f06aa38cda5aaf0c21708b0c71e/lib/request.js#L179-L182
acceptsLanguages()
I want to unit test my configured express-locale middleware, with uses above method, but it doesn't work.
express-locale
const req = httpMocks.createRequest({ headers: { 'Accept-Language': `${language}-${region}`, }, });
The accepts module supports languages (which is utilized by express)
accepts
languages
Also acceptsCharsets and acceptsEncoding of express are missing
acceptsCharsets
acceptsEncoding
duplicate of #128
Express Request provides
acceptsLanguages()
. https://github.com/expressjs/express/blob/e1b45ebd050b6f06aa38cda5aaf0c21708b0c71e/lib/request.js#L179-L182I want to unit test my configured
express-locale
middleware, with uses above method, but it doesn't work.The
accepts
module supportslanguages
(which is utilized by express)