feat: first cut at the import execution
This commit is contained in:
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
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user