mirror of
https://github.com/tiennm99/ccs.git
synced 2026-08-24 08:29:16 +00:00
test(logging): stabilize log reader cache refresh coverage
This commit is contained in:
@@ -113,6 +113,8 @@ describe('log reader', () => {
|
|||||||
})
|
})
|
||||||
)}\n`
|
)}\n`
|
||||||
);
|
);
|
||||||
|
const futureTimestamp = new Date(Date.now() + 10_000);
|
||||||
|
fs.utimesSync(currentLogPath, futureTimestamp, futureTimestamp);
|
||||||
|
|
||||||
expect(readLogEntries({ limit: 1 }).map((entry) => entry.id)).toEqual(['disk-new']);
|
expect(readLogEntries({ limit: 1 }).map((entry) => entry.id)).toEqual(['disk-new']);
|
||||||
expect(readSpy).toHaveBeenCalledTimes(2);
|
expect(readSpy).toHaveBeenCalledTimes(2);
|
||||||
|
|||||||
Reference in New Issue
Block a user