Skip to content

Commit 24406fc

Browse files
fix: remove double onProgress call at end of import
1 parent 2dd115a commit 24406fc

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/services/event-import-service.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ export class EventImportService {
220220
}
221221

222222
await flushBatch()
223-
onProgress({ ...stats })
224223

225224
return stats
226225
} finally {

test/unit/services/event-import-service.spec.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,8 @@ describe('EventImportService', () => {
8181
expect(firstBatch.map(({ id }) => id)).to.deep.equal([event.id, event.id])
8282
expect(secondBatch.map(({ id }) => id)).to.deep.equal([event.id])
8383

84+
expect(progressUpdates.length).to.equal(2)
85+
8486
const finalProgress = progressUpdates[progressUpdates.length - 1]
8587

8688
expect(finalProgress).to.deep.equal(stats)

0 commit comments

Comments
 (0)