DavertMik · GitHub

@gololdf1sh

`Object.assign(defaultRetryOptions, retryOpts)` returned and used the
shared module-level `defaultRetryOptions` object as the merge target,
so any custom retry option (e.g. `minTimeout`, `factor`) persisted into
the defaults for every later `recorder.retry()` call.
Subsequent steps and tests then silently inherited the previous run's
overrides. A test that explicitly set `minTimeout=1000` poisoned the
defaults for the rest of the session — later steps used 1000ms even
when no `minTimeout` was passed.
Pass a fresh `{}` as the first arg to `Object.assign` so a new merged
options object is produced each call without touching the shared
defaults.

Read the original on github.com ↗