feat: first cut at the import execution
This commit is contained in:
1378
tests/engine/ImportExecutionEngine.e2e.test.ts
Normal file
1378
tests/engine/ImportExecutionEngine.e2e.test.ts
Normal file
File diff suppressed because it is too large
Load Diff
1549
tests/engine/ImportExecutionEngine.test.ts
Normal file
1549
tests/engine/ImportExecutionEngine.test.ts
Normal file
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