fix: resolve flaky pagination integration test (isolated collection)

This commit is contained in:
Kevin L'Hereec committed 2026-06-02 18:10:35 +02:00
1 parent f0670224f3
commit d9b3a1b810
1 file changed
+2 -1
@@ -90,7 +90,7 @@ describe('BaseModel (integration)', () => {
})
it('pagination works with skip and limit', async () => {
const col = db.collection('test_base')
const col = db.collection('test_pagination')
const docs = Array.from({ length: 25 }, (_, i) => ({ idx: i }))
await col.insertMany(docs)
const page1 = await col.find({}).sort({ idx: 1 }).skip(0).limit(10).toArray()
@@ -99,6 +99,7 @@ describe('BaseModel (integration)', () => {
expect(page2).toHaveLength(10)
expect(page1[0].idx).toBe(0)
expect(page2[0].idx).toBe(10)
await col.drop()
})
it('updateMany modifies multiple documents', async () => {