Skip to content

Cover array input for req.acceptsCharsets()#7195

Closed
Bojun-Vvibe wants to merge 1 commit intoexpressjs:masterfrom
Bojun-Vvibe:agent/expressjs_express-1776704534
Closed

Cover array input for req.acceptsCharsets()#7195
Bojun-Vvibe wants to merge 1 commit intoexpressjs:masterfrom
Bojun-Vvibe:agent/expressjs_express-1776704534

Conversation

@Bojun-Vvibe
Copy link
Copy Markdown

Repo: expressjs/express (⭐ 66000)
Type: test
Files changed: 2
Lines: +23/-9

What

Adds a focused test that covers passing an array to req.acceptsCharsets(), and updates the req.acceptsCharsets() JSDoc in lib/request.js so it documents the same supported input forms and return behavior as the rest of the req.accepts* helpers.

Why

req.acceptsCharsets() already exposes array-style input through the underlying accepts API, but that behavior was not covered by tests and the docstring incorrectly described a comma-delimited string form instead. This patch closes that documentation gap and locks the public API behavior down with a small regression test.

Testing

Verified syntax for the touched files with node --check lib/request.js and node --check test/req.acceptsCharsets.js. The targeted mocha test was not run locally because this clone does not have node_modules installed.

Risk

Low / documentation-only behavior clarification plus one narrow test for an existing public API path.

@Bojun-Vvibe Bojun-Vvibe closed this by deleting the head repository Apr 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants