Timecop.js
A Javascript library providing "time travel" and "time freezing" capabilities for testing. See also https://github.com/jtrupiano/timecop
Install / Use
/learn @jamesarosen/Timecop.jsREADME
What
A port of John Trupiano's awesome Timecop Ruby to Javascript.
How
Call Timecop.install() once to get started. This replaces Date with
Timecop.MockDate. After that, you can travel through time at will.
Travel to the morning of October 17, 2010, and allow time to continue advancing:
Timecop.travel(new Date(2010, 10, 17, 11, 45));
Travel to the afternoon of January 21, 2012, and keep time frozen then:
Timecop.freeze(new Date(2012, 1, 21, 14, 30));
Return to the present:
Timecop.returnToPresent();
Finally, to uninstall Timecop and reinstate the native Date constructor:
Timecop.uninstall();
Contributing
See Contributing.md.
Related Skills
node-connect
349.7kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.7kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.7kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
