We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4023f6b commit f03da24Copy full SHA for f03da24
src/Lighthouse/tests/deleteFile.test.ts
@@ -6,7 +6,14 @@ describe('deleteFile', () => {
6
const fileId = process.env.TEST_FILE_ID as string
7
8
it('should delete a file with correct API key and file ID', async () => {
9
- const res = await lighthouse.deleteFile(apiKey, fileId)
+ const uploadsRes = await lighthouse.getUploads(apiKey)
10
+ const fileList = uploadsRes.data.fileList
11
+ expect(fileList.length).toBeGreaterThan(0)
12
+
13
+ const firstFileId = fileList[0].id
14
+ expect(typeof firstFileId).toBe('string')
15
16
+ const res = await lighthouse.deleteFile(apiKey, firstFileId)
17
expect(res.data.message).toBe('File deleted successfully.')
18
}, 60000)
19
0 commit comments