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

mxschmitt / playwright-go / 31999264115
80%

Build:
DEFAULT BRANCH: main
Ran 17 Aug 2026 06:04AM UTC
Jobs 9
Files 62
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

17 Aug 2026 05:49AM UTC coverage: 79.604% (+0.04%) from 79.568%
31999264115

push

github

web-flow
fix: reject unusable event predicates instead of panicking in the dispatch goroutine (#635)

The generic ExpectEvent/WaitForEvent APIs on Page, BrowserContext and WebSocket
take `Predicate any` — necessarily untyped, since the event argument type
differs per event — and invoked it through reflection with no validation:

    if predicate == nil || reflect.ValueOf(predicate).IsNil() {
    ...
    result := reflect.ValueOf(predicate).Call([]reflect.Value{reflect.ValueOf(ev[0])})

Both lines panic on a predicate the caller got wrong:

    Predicate: "not-a-function"
    panic: reflect: call of reflect.Value.IsNil on string Value

    Predicate: func(playwright.Request) bool   // on a "console" event
    panic: reflect: Call using *playwright.consoleMessageImpl as type playwright.Request

These fire inside eventEmitter.Emit → callHandlers, i.e. the library's own
dispatch goroutine, so they take down the process and the caller cannot recover
them.

Upstream wraps the predicate call in try/catch and rejects the wait
(client/waiter.ts), so a bad predicate surfaces as an error on the awaited
promise. Do the same: validate the predicate's kind and signature, check the
event argument is assignable, and recover a panic raised by the predicate body,
reporting each as an error through the existing reject path.

Also guards the same unchecked reflect.Call in RejectOnEvent. Its predicates are
supplied internally today, so this is consistency rather than a live bug.

Typed nil predicates (e.g. a nil `func(any) bool` variable) now mean "no
predicate", matching an untyped nil, instead of panicking in IsNil.


Claude-Session: https://claude.ai/code/session_01Hr35MBUfsUG9DnxhBgBcZW

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

51 of 59 new or added lines in 1 file covered. (86.44%)

9293 of 11674 relevant lines covered (79.6%)

12124.39 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
93.22
-3.63% waiter.go
Jobs
ID Job ID Ran Files Coverage
1 macos-latest-webkit - 31999264115.1 17 Aug 2026 07:04AM UTC 62
12.94
GitHub Action Run
2 windows-latest-webkit - 31999264115.2 17 Aug 2026 06:12AM UTC 62
77.93
GitHub Action Run
3 ubuntu-latest-webkit - 31999264115.3 17 Aug 2026 06:09AM UTC 62
77.89
GitHub Action Run
4 macos-latest-firefox - 31999264115.4 17 Aug 2026 07:06AM UTC 62
78.01
GitHub Action Run
5 windows-latest-firefox - 31999264115.5 17 Aug 2026 06:14AM UTC 62
77.99
GitHub Action Run
6 windows-latest-chromium - 31999264115.6 17 Aug 2026 06:04AM UTC 62
14.16
GitHub Action Run
7 ubuntu-latest-firefox - 31999264115.7 17 Aug 2026 06:11AM UTC 62
78.01
GitHub Action Run
8 ubuntu-latest-chromium - 31999264115.8 17 Aug 2026 06:09AM UTC 62
79.31
GitHub Action Run
9 macos-latest-chromium - 31999264115.9 17 Aug 2026 06:54AM UTC 62
79.31
GitHub Action Run
Source Files on build 31999264115
  • Tree
  • List 62
  • Changed 59
  • Source Changed 0
  • Coverage Changed 59
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b4b4642d on github
  • Prev Build on main (#31999171077)
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