Skip to content

test(req): cover req.is() when given an array of types - #7394

Closed
Errr0rr404 wants to merge 1 commit into
expressjs:masterfrom
Errr0rr404:test/req-is-array-coverage
Closed

test(req): cover req.is() when given an array of types#7394
Errr0rr404 wants to merge 1 commit into
expressjs:masterfrom
Errr0rr404:test/req-is-array-coverage

Conversation

@Errr0rr404

Copy link
Copy Markdown

Summary

  • req.is() documents String|Array types, but the array branch had no test coverage.
  • Adds tests for matching, non-matching, and mime-type arrays.

Fixes #7348

Test plan

  • New tests in test/req.is.js

The array branch in lib/request.js was the only uncovered branch in
that file. Adds tests matching the documented String|Array API.

Fixes expressjs#7348
@Errr0rr404

Copy link
Copy Markdown
Author

Note for reviewers: #7112 also touches test/req.is.js as part of a large “100% coverage” PR. This PR is intentionally only the array cases for req.is(), so it can land independently of that broader change if preferred.

@krzysdz

krzysdz commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Duplicate of #6703

@krzysdz krzysdz marked this as a duplicate of #6703 Jul 23, 2026
@krzysdz krzysdz closed this Jul 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Missing test coverage for req.is() with an array argument

2 participants