refactor(web): reimplement operation-support as part of timeline-manager (#24056)

* refactor(web): reimplement operation-support as part of timeline-manager

Improve clarity of methods. 
Add inline method documentation.  
Make return type of AssetOperation optional.

* Review comments - self document code. remove optional return from callback
This commit is contained in:
Min Idzelis
2025-12-01 09:04:39 -06:00
committed by GitHub
parent 65e4fdf98d
commit ab35afd3b1
13 changed files with 168 additions and 210 deletions

View File

@@ -278,10 +278,11 @@ describe('TimelineManager', () => {
});
it('updates existing asset', () => {
const updateAssetsSpy = vi.spyOn(timelineManager, 'upsertAssets');
const asset = deriveLocalDateTimeFromFileCreatedAt(timelineAssetFactory.build());
timelineManager.upsertAssets([asset]);
timelineManager.upsertAssets([asset]);
expect(updateAssetsSpy).toBeCalledWith([asset]);
expect(timelineManager.assetCount).toEqual(1);
});