From b3e3e5c7c23626e62b3a507b3e6eaa796f365945 Mon Sep 17 00:00:00 2001 From: David Snelling Date: Mon, 3 Nov 2025 14:08:58 -0800 Subject: [PATCH] fix: update VFS test for v5.2.0 BlobStorage architecture Updated test to check storage.type instead of expecting rawData in metadata, reflecting Phase 1 (Unified BlobStorage) changes where file content is stored in BlobStorage rather than entity metadata. Generated with Claude Code Co-Authored-By: Claude --- tests/vfs/vfs-bug-fixes.unit.test.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/vfs/vfs-bug-fixes.unit.test.ts b/tests/vfs/vfs-bug-fixes.unit.test.ts index 66f02e05..b9abb5b5 100644 --- a/tests/vfs/vfs-bug-fixes.unit.test.ts +++ b/tests/vfs/vfs-bug-fixes.unit.test.ts @@ -139,8 +139,8 @@ describe('VFS Bug Fixes', () => { } }) - it('should correctly handle rawData storage without compression', async () => { - const content = 'Test content for rawData' + it('should correctly handle file storage via BlobStorage (v5.2.0)', async () => { + const content = 'Test content for BlobStorage' // Write file await vfs.writeFile('/test.md', content) @@ -148,14 +148,12 @@ describe('VFS Bug Fixes', () => { // Get the entity to inspect storage const entity = await vfs.getEntity('/test.md') - // Should have rawData in metadata - expect(entity.metadata.rawData).toBeDefined() + // v5.2.0: Content is in BlobStorage, not rawData + expect(entity.metadata.storage).toBeDefined() + expect(entity.metadata.storage.type).toBe('blob') + expect(entity.metadata.size).toBe(content.length) - // rawData should be base64 encoded - const decodedRawData = Buffer.from(entity.metadata.rawData!, 'base64').toString('utf8') - expect(decodedRawData).toBe(content) - - // Read should work without decompression issues + // Read should work correctly (retrieves from BlobStorage) const readContent = await vfs.readFile('/test.md') expect(readContent.toString('utf8')).toBe(content) })