feat: first cut at the import execution

This commit is contained in:
2026-02-14 20:49:43 +01:00
parent 973d6af231
commit b036cf3c46
13 changed files with 5130 additions and 5 deletions

View File

@@ -284,6 +284,17 @@ describe('MediaEngine', () => {
expect(media.updatedAt.getTime()).toBeLessThanOrEqual(after.getTime());
});
it('should use provided createdAt date when specified', async () => {
const historicalDate = new Date('2018-05-15T10:30:00Z');
const media = await mediaEngine.importMedia('/source/image.jpg', {
createdAt: historicalDate,
updatedAt: historicalDate,
});
expect(media.createdAt.getTime()).toBe(historicalDate.getTime());
expect(media.updatedAt.getTime()).toBe(historicalDate.getTime());
});
it('should emit mediaImported event', async () => {
const handler = vi.fn();
mediaEngine.on('mediaImported', handler);