DavertMik ยท GitHub

The wildcard check used `ignored.indexOf('*')` as a boolean. `-1` is
truthy in JavaScript (only `0` is falsy), so entries without `*` were
matched via `startsWith(slice(0, -1))` instead of exact compare, which
also chops the last character โ€” broadening the match further.
`ignoredSteps: ['see']` silently ignored `seeElement`, `seeInField`,
`selectOption`, `sendPostRequest` โ€” anything starting with `se`.
Compare against `-1` explicitly so exact-name entries only match
themselves, as the docs describe.

DavertMik

approved these changes May 18, 2026

Each call to retryFailedStep mutated the module-level defaultConfig via
Object.assign(defaultConfig, config), so config.when from a prior call leaked
into the next as customWhen and chained recursively. In tests this made
when() return undefined for closures that no longer had a live step.started
listener (e.g. after event.cleanDispatcher), causing the new regression test
to fail in the full unit suite even though it passed in isolation.
Use Object.assign({}, defaultConfig, config) so each registration gets an
independent config object. Rewrites the regression test to assert via
retryConfig.when() directly, which is now sound.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

@DavertMik

Read the original on github.com โ†—