feat: first cut at the import execution

This commit is contained in:
hugo committed 2026-02-14 20:49:43 +01:00
1 parent 973d6af231
commit b036cf3c46
13 files changed
+5130 -5

No files matched your search

File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+11
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);