Skip to content

Commit a5dc5cf

Browse files
committed
Remove snapshot testing for batches because too flaky
1 parent fde2f60 commit a5dc5cf

File tree

2 files changed

+12
-60
lines changed

2 files changed

+12
-60
lines changed

tests/__snapshots__/batch.test.ts.snap

Lines changed: 0 additions & 59 deletions
This file was deleted.

tests/batch.test.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,18 @@ describe.each([{ permission: "Master" }, { permission: "Admin" }])(
3333
const batches = await client.batches.getBatches();
3434
const batch = await client.batches.getBatch(batches.results[0].uid);
3535
expect(batch.uid).toEqual(batches.results[0].uid);
36-
expect(batch).toMatchSnapshot();
36+
37+
// Can't use toMatchSnapshot because the output changes every time
38+
expect(batch.details).toBeDefined();
39+
expect(batch.stats).toHaveProperty("totalNbTasks");
40+
expect(batch.stats).toHaveProperty("status");
41+
expect(batch.stats).toHaveProperty("types");
42+
expect(batch.stats).toHaveProperty("indexUids");
43+
expect(batch.stats).toHaveProperty("progressTrace");
44+
expect(batch.duration).toBeDefined();
45+
expect(batch.startedAt).toBeDefined();
46+
expect(batch.finishedAt).toBeDefined();
47+
expect(batch.progress).toBeDefined();
3748
});
3849
},
3950
);

0 commit comments

Comments
 (0)