MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / resetForTesting

Function resetForTesting

source code/utils/settings/changeDetector.ts:463–482  ·  view source on GitHub ↗
(overrides?: {
  stabilityThreshold?: number
  pollInterval?: number
  mdmPollInterval?: number
  deletionGrace?: number
})

Source from the content-addressed store, hash-verified

461 * pending awaitWriteFinish poll fires on the deleted dir → ENOENT (#25253).
462 */
463export function resetForTesting(overrides?: {
464 stabilityThreshold?: number
465 pollInterval?: number
466 mdmPollInterval?: number
467 deletionGrace?: number
468}): Promise<void> {
469 if (mdmPollTimer) {
470 clearInterval(mdmPollTimer)
471 mdmPollTimer = null
472 }
473 for (const timer of pendingDeletions.values()) clearTimeout(timer)
474 pendingDeletions.clear()
475 lastMdmSnapshot = null
476 initialized = false
477 disposed = false
478 testOverrides = overrides ?? null
479 const w = watcher
480 watcher = null
481 return w ? w.close() : Promise.resolve()
482}
483
484export const settingsChangeDetector = {
485 initialize,

Callers

nothing calls this directly

Calls 3

resolveMethod · 0.80
clearMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected