fix(core,testing): improve type safety and update tests for latest tstest and storage APIs

This commit is contained in:
2026-04-30 09:25:26 +00:00
parent 2e2726a4de
commit 45e24ecff3
19 changed files with 1394 additions and 1414 deletions
+13 -3
View File
@@ -89,6 +89,17 @@ tap.test('setup: should create S3 storage backend', async () => {
}
return paths;
},
objectExists: async (key: string): Promise<boolean> => {
try {
const data = await s3Bucket.fastGet({ path: key });
return !!data;
} catch {
return false;
}
},
getMetadata: async (_key: string): Promise<Record<string, string> | null> => {
return null;
},
};
expect(storageBackend).toBeTruthy();
@@ -584,9 +595,8 @@ tap.test('cleanup: should stop cache and clean up bucket', async () => {
// Clean up test bucket
if (s3Bucket) {
try {
const files = await s3Bucket.fastList({});
for (const file of files) {
await s3Bucket.fastRemove({ path: file.name });
for await (const filePath of s3Bucket.listAllObjects('')) {
await s3Bucket.fastRemove({ path: filePath });
}
await smartBucket.removeBucket(bucketName);
} catch {