Files
test/test_output_4.txt

47 lines
1.4 KiB
Plaintext

console.log
[FileCleanup] Cleaning up old file: /uploads/test/old-image.png
at Proxy.delegate.update (src/prisma/file-cleanup.helper.ts:49:25)
console.log
[FileCleanup] Using provider: CloudinaryStorageProvider
at Proxy.delegate.update (src/prisma/file-cleanup.helper.ts:51:25)
console.log
[FileCleanup] Calling delete on provider...
at Proxy.delegate.update (src/prisma/file-cleanup.helper.ts:54:25)
console.log
[FileCleanup] Delete called.
at Proxy.delegate.update (src/prisma/file-cleanup.helper.ts:58:25)
FAIL test/file-cleanup.spec.ts
File Cleanup Middleware
× should delete old file when user image is updated (902 ms)
● File Cleanup Middleware › should delete old file when user image is updated
expect(received).toBe(expected) // Object.is equality
Expected: false
Received: true
69 | // 5. Verify old file is gone
70 | const fileExists = fs.existsSync(oldFilePath);
> 71 | expect(fileExists).toBe(false);
| ^
72 |
73 | // 6. Verify File record is gone
74 | const fileRecord = await prisma.file.findFirst({
at Object.<anonymous> (test/file-cleanup.spec.ts:71:24)
Test Suites: 1 failed, 1 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 1.71 s, estimated 2 s
Ran all test suites matching test/file-cleanup.spec.ts.