()
| 327 | // the lazy-load latch so the next call re-reads from disk (or sees a |
| 328 | // clean slate if the caller removed the file themselves). |
| 329 | function _resetStateForTests() { |
| 330 | _state = { |
| 331 | nextAttemptAt: 0, |
| 332 | transientFailures: 0, |
| 333 | fundsFailures: 0, |
| 334 | lastSuccessAt: 0, |
| 335 | disabledUntilRestart: false, |
| 336 | }; |
| 337 | _stateLoaded = false; |
| 338 | try { fs.unlinkSync(_stateFile()); } catch (_) {} |
| 339 | } |
| 340 | |
| 341 | function _getStateForTests() { |
| 342 | return Object.assign({}, _state); |
nothing calls this directly
no test coverage detected