{"record":{"id":"a404c634aaf03ccc","repo":"ruvnet/ruflo","slug":"clock-not-installed-call-install-first","errorCode":null,"errorMessage":"Clock not installed. Call install() first.","messagePattern":"Clock not installed\\. Call install\\(\\) first\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"v3/@claude-flow/testing/src/helpers/test-utils.ts","lineNumber":306,"sourceCode":"  let currentTime = Date.now();\n\n  return {\n    install() {\n      if (installed) return;\n      vi.useFakeTimers();\n      vi.setSystemTime(currentTime);\n      installed = true;\n    },\n\n    uninstall() {\n      if (!installed) return;\n      vi.useRealTimers();\n      installed = false;\n    },\n\n    tick(ms: number) {\n      if (!installed) {\n        throw new Error('Clock not installed. Call install() first.');\n      }\n      currentTime += ms;\n      vi.advanceTimersByTime(ms);\n    },\n\n    setTime(time: number | Date) {\n      currentTime = typeof time === 'number' ? time : time.getTime();\n      if (installed) {\n        vi.setSystemTime(currentTime);\n      }\n    },\n\n    getTime() {\n      return currentTime;\n    },\n\n    runAllTimers() {\n      if (!installed) {","sourceCodeStart":288,"sourceCodeEnd":324,"githubUrl":"https://github.com/ruvnet/ruflo/blob/fa13ee4ad60ac2090b1480656eb233521790d640/v3/@claude-flow/testing/src/helpers/test-utils.ts#L288-L324","documentation":"The mock clock helper's tick() was called while the fake timers are not installed (install() was never called or uninstall() already ran). Ticking without vi.useFakeTimers would do nothing, so the helper throws to flag the setup omission.","triggerScenarios":"Thrown at v3/@claude-flow/testing/src/helpers/test-utils.ts:306 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Call clock.install() before using fake timers.","Ensure uninstall/restore ordering in teardown does not remove the clock early."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"fa13ee4ad60ac2090b1480656eb233521790d640","analyzedAt":"2026-08-18T21:34:22.708Z","contentChangedAt":"2026-08-18T21:34:22.708Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}