From 9be04ceed6fd07fac0ef4015ffdd34fa7b06e299 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 29 Sep 2026 09:36:21 +0000 Subject: [PATCH] test(storage): type the archived objects fixture instead of casting to any Same treatment as the object versions fixture: the row type comes from the function under test. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01N3euXsz25sTybsGTcxCFfn --- .../versioning/archived-objects-query.test.ts | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/apps/studio/data/storage/versioning/archived-objects-query.test.ts b/apps/studio/data/storage/versioning/archived-objects-query.test.ts index 37b37f4ff8d..0b4ef3947fa 100644 --- a/apps/studio/data/storage/versioning/archived-objects-query.test.ts +++ b/apps/studio/data/storage/versioning/archived-objects-query.test.ts @@ -2,16 +2,17 @@ import { describe, expect, it } from 'vitest' import { toArchivedObjects } from './archived-objects-query' -const row = (overrides: Record) => - ({ - name: 'folder/photo.jpg', - id: 'id', - updated_at: '2026-01-01T00:00:00Z', - created_at: '2026-01-01T00:00:00Z', - last_accessed_at: '2026-01-01T00:00:00Z', - metadata: { size: 100, mimetype: 'image/jpeg' }, - ...overrides, - }) as any +type StorageObjectV2 = Parameters[0][number] + +const row = (overrides: Partial): StorageObjectV2 => ({ + name: 'folder/photo.jpg', + id: 'id', + updated_at: '2026-01-01T00:00:00Z', + created_at: '2026-01-01T00:00:00Z', + last_accessed_at: '2026-01-01T00:00:00Z', + metadata: { size: 100, mimetype: 'image/jpeg' }, + ...overrides, +}) describe('toArchivedObjects', () => { it('treats an object whose top row is a delete marker as archived', () => {