Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Murderlon committed Mar 5, 2025
1 parent fcdc97d commit 41c7fec
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 35 deletions.
21 changes: 0 additions & 21 deletions packages/@uppy/core/src/Uppy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -821,27 +821,6 @@ describe('src/Core', () => {
uploadStarted: null,
})
})

it('should report an error if post-processing a file fails', () => {
const core = new Core()

core.addFile({
source: 'vi',
name: 'foo.jpg',
type: 'image/jpeg',
data: testImage,
})

const fileId = Object.keys(core.getState().files)[0]
const file = core.getFile(fileId)
core.emit('error', new Error('foooooo'), file)

expect(core.getState().error).toEqual('foooooo')

expect(core.upload()).resolves.toMatchObject({
failed: [{ name: 'foo.jpg' }],
})
})
})

describe('uploaders', () => {
Expand Down
14 changes: 0 additions & 14 deletions packages/@uppy/core/src/Uppy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2272,13 +2272,6 @@ export class Uppy<

this.emit('retry-all', Object.values(updatedFiles))

if (filesToRetry.length === 0) {
return Promise.resolve({
successful: [],
failed: [],
})
}

const uploadID = this.#createUpload(filesToRetry, {
forceAllowNewUpload: true, // create new upload even if allowNewUpload: false
})
Expand Down Expand Up @@ -2341,13 +2334,6 @@ export class Uppy<
}
})

if (waitingFileIDs.length === 0) {
return Promise.resolve({
successful: [],
failed: [],
})
}

const uploadID = this.#createUpload(waitingFileIDs)
return this.#runUpload(uploadID)
})
Expand Down

0 comments on commit 41c7fec

Please sign in to comment.