Skip to content

Commit f826ae0

Browse files
committed
Update bulk test assertions to ensure duration is non-negative and refactor progress updates initialization for clarity.
1 parent 1857dca commit f826ae0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/api/bulk.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ describe('BulkOperationsService', () => {
3232
expect(result.errors).toHaveLength(0);
3333
expect(operation).toHaveBeenCalledTimes(5);
3434
expect(result.operationId).toBeDefined();
35-
expect(result.duration).toBeGreaterThan(0);
35+
expect(result.duration).toBeGreaterThanOrEqual(0);
3636
});
3737

3838
it('should handle partial failures when continueOnError is true', async () => {
@@ -268,7 +268,7 @@ describe('BulkOperationsService', () => {
268268
describe('progress estimation', () => {
269269
it('should calculate estimated time remaining', async () => {
270270
const items = [1, 2, 3, 4, 5];
271-
let progressUpdates: BulkProgress[] = [];
271+
const progressUpdates: BulkProgress[] = [];
272272

273273
const operation = jest.fn().mockImplementation(async () => {
274274
// Simulate some processing time

0 commit comments

Comments
 (0)