Files
med-notes/.pnpm-store/v10/files/88/1638ff637c767ec24203cc21a5f22cae9355146f823fc5cd9ce3f6047f9c6660cefaffbe32b31c471d532cd5acd5b8da6adfc609fdcf14394c1c15a4a7f28e
2025-06-26 03:35:15 +00:00

18 lines
527 B
Plaintext

import { createConfigDir, getLastUpdate, saveLastUpdate } from './cache';
createConfigDir();
jest.useFakeTimers().setSystemTime(new Date('2022-01-01'));
const fakeTime = new Date('2022-01-01').getTime();
test('can save update then get the update details', () => {
saveLastUpdate('test');
expect(getLastUpdate('test')).toBe(fakeTime);
});
test('prefixed module can save update then get the update details', () => {
saveLastUpdate('@alexbrazier/test');
expect(getLastUpdate('@alexbrazier/test')).toBe(fakeTime);
});