MCPcopy Create free account
hub / github.com/EvoMap/evolver / withFixedNow

Function withFixedNow

test/mailboxStore.test.js:26–34  ·  view source on GitHub ↗
(now, fn)

Source from the content-addressed store, hash-verified

24}
25
26function withFixedNow(now, fn) {
27 const originalNow = Date.now;
28 Date.now = () => now;
29 try {
30 return fn();
31 } finally {
32 Date.now = originalNow;
33 }
34}
35
36function inboundRow({ id, type, text, now }) {
37 return {

Callers 1

Calls 1

fnFunction · 0.70

Tested by

no test coverage detected