• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

cheeriojs / cheerio / 47104838399
99%

Build:
DEFAULT BRANCH: main
Ran 03 Dec 2026 12:21PM UTC
Jobs 1
Files 16
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

03 Dec 2026 12:21PM UTC coverage: 99.485% (-0.09%) from 99.57%
47104838399

push

github

web-flow
fix(attributes): read values from the first matched control (#5621)

Fixes [#5620](https://github.com/cheeriojs/cheerio/issues/5620).

The `val()` getter is meant to read the first matched element, as in jQuery, but for textareas and selects it read the whole selection. Two textareas returned their text joined together, and two multiple selects returned the selected options of both:

```js
const $ = load('<textarea>first</textarea><textarea>second</textarea>');

$('textarea').val(); // before: 'firstsecond', now: 'first'
```

The getter now reads a textarea's text and a select's selected options from the first matched element only. Setters still update every matched element. The getter's documentation now says it reads the first element.

Two tests, one per getter path, check a textarea and a multiple select against a selection of two controls. Both fail on main.

273 of 273 branches covered (100.0%)

Branch coverage included in aggregate %.

2 of 2 new or added lines in 1 file covered. (100.0%)

1 existing line in 1 file now uncovered.

886 of 892 relevant lines covered (99.33%)

3322.61 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
99.35
-0.32% src/api/attributes.ts
Jobs
ID Job ID Ran Files Coverage
1 47104838399.1 03 Dec 2026 12:21PM UTC 16
99.48
GitHub Action Run
Source Files on build 47104838399
  • Tree
  • List 16
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #47104838399
  • e56efb75 on github
  • Prev Build on main (#47003060933)
  • Next Build on main (#47105014976)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc