diff options
| author | Mohamed Bassem <me@mbassem.com> | 2025-11-08 16:58:00 +0000 |
|---|---|---|
| committer | Mohamed Bassem <me@mbassem.com> | 2025-11-08 16:58:00 +0000 |
| commit | 27ed0a198f5c427c7044b1a24deade6054d89dac (patch) | |
| tree | 2cd00c8e211f105ccc061be0516665ad8f443dac /packages/trpc | |
| parent | 474f64293e84a5bc6a7366f934eac0ba57b3eac6 (diff) | |
| download | karakeep-27ed0a198f5c427c7044b1a24deade6054d89dac.tar.zst | |
tests: Fix failing test
Diffstat (limited to 'packages/trpc')
| -rw-r--r-- | packages/trpc/routers/assets.test.ts | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/packages/trpc/routers/assets.test.ts b/packages/trpc/routers/assets.test.ts index 822e48b1..14e5fd78 100644 --- a/packages/trpc/routers/assets.test.ts +++ b/packages/trpc/routers/assets.test.ts @@ -57,7 +57,11 @@ describe("Asset Routes", () => { ]); const validateAssets = async ( - expected: { id: string; assetType: ZAssetType }[], + expected: { + id: string; + assetType: ZAssetType; + fileName: string | null; + }[], ) => { const b = await apiCallers[0].bookmarks.getBookmark({ bookmarkId: bookmark.id, @@ -75,10 +79,10 @@ describe("Asset Routes", () => { }); await validateAssets([ - { id: "asset1", assetType: "screenshot" }, - { id: "asset2", assetType: "bannerImage" }, - { id: "asset3", assetType: "fullPageArchive" }, - { id: "asset4", assetType: "screenshot" }, + { id: "asset1", assetType: "screenshot", fileName: null }, + { id: "asset2", assetType: "bannerImage", fileName: null }, + { id: "asset3", assetType: "fullPageArchive", fileName: null }, + { id: "asset4", assetType: "screenshot", fileName: null }, ]); await api.replaceAsset({ @@ -88,10 +92,10 @@ describe("Asset Routes", () => { }); await validateAssets([ - { id: "asset2", assetType: "bannerImage" }, - { id: "asset3", assetType: "fullPageArchive" }, - { id: "asset4", assetType: "screenshot" }, - { id: "asset5", assetType: "screenshot" }, + { id: "asset2", assetType: "bannerImage", fileName: null }, + { id: "asset3", assetType: "fullPageArchive", fileName: null }, + { id: "asset4", assetType: "screenshot", fileName: null }, + { id: "asset5", assetType: "screenshot", fileName: null }, ]); await api.detachAsset({ @@ -100,9 +104,9 @@ describe("Asset Routes", () => { }); await validateAssets([ - { id: "asset2", assetType: "bannerImage" }, - { id: "asset3", assetType: "fullPageArchive" }, - { id: "asset5", assetType: "screenshot" }, + { id: "asset2", assetType: "bannerImage", fileName: null }, + { id: "asset3", assetType: "fullPageArchive", fileName: null }, + { id: "asset5", assetType: "screenshot", fileName: null }, ]); // You're not allowed to attach/replace a fullPageArchive |
