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

reactjs / react-docgen / 41193625346
89%

Build:
DEFAULT BRANCH: main
Ran 31 Oct 2026 10:40AM UTC
Jobs 3
Files 89
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

31 Oct 2026 10:39AM UTC coverage: 88.297% (+0.2%) from 88.129%
41193625346

push

github

web-flow
fix: detect useCallback methods in imperative handles (#1139)

* fix: detect useCallback methods in imperative handles

* test: cover imperative handle callback references

* fix: document the function a useCallback method wraps

The handler recognised a useCallback-wrapped property as a method, but
the documentation was built from the call expression, so the method
came out with no parameters and no return type. resolveToMethodFunction
now resolves a value to the function it documents, unwrapping a React
useCallback call, and both the handler's method test and the
documentation builder use it. The tests assert the wrapped function's
signature and cover a local function named useCallback, a call with no
arguments and a non-function argument.

* test: cover every surface that documents a useCallback method

The handler's unwrapping now runs for every method node path, so add the
surfaces it reaches beyond the imperative handle identifier: a callback
written inline in the handle object, an ObjectExpression component, a
statics object, a class property and a Component.foo assignment, plus the
docblock and the async/generator modifiers of the wrapped function, a
renamed useCallback import and a handle that precedes the declaration.
The controls pin the guards the unwrapping keeps: a local useCallback, a
missing or non-function argument, a spread argument, a nested call and
useMemo.

* test: pin the zero-parameter, unannotated useCallback method

Every positive callback fixture carried a typed parameter and a return
annotation, so the empty-signature path the boundary ledger claims was
never exercised. Admit useCallback(() => {}, []) through
useImperativeHandle and assert an empty params list and a null return.

* chore: add changeset for the useCallback method fix

* test: run the reported component through the parser

The handler tests build a component definition and call the handler
directly, so none of them exercise the resolver path the issue reports... (continued)

1516 of 1782 branches covered (85.07%)

Branch coverage included in aggregate %.

19 of 19 new or added lines in 2 files covered. (100.0%)

1 existing line in 1 file now uncovered.

1917 of 2106 relevant lines covered (91.03%)

575.77 hits per line

Coverage Regressions

Lines Coverage ∆ File
1
88.08
0.95% packages/react-docgen/src/utils/getMethodDocumentation.ts
Jobs
ID Job ID Ran Files Coverage
1 test-windows - 41193625346.1 31 Oct 2026 10:41AM UTC 89
88.3
GitHub Action Run
2 test-ubuntu - 41193625346.2 31 Oct 2026 10:40AM UTC 89
88.3
GitHub Action Run
3 test-macos - 41193625346.3 31 Oct 2026 10:41AM UTC 89
88.3
GitHub Action Run
Source Files on build 41193625346
  • Tree
  • List 89
  • Changed 3
  • Source Changed 2
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #41193625346
  • a73f036e on github
  • Prev Build on main (#41193171861)
  • Next Build on main (#41194377839)
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