Skip to content

πŸ”₯ πŸ”₯ πŸ”₯ A Free & Self-hostable Airtable Alternative

really fix the batching logic

Fendy Heryantob332f2ed50d4
diff --git a/tests/playwright/setup/demoTable.ts b/tests/playwright/setup/demoTable.ts
index 06633aadd0..6d1794c729 100644
--- a/tests/playwright/setup/demoTable.ts
+++ b/tests/playwright/setup/demoTable.ts
@@ -269,13 +269,8 @@ async function createDemoTable({
}
const BATCH_SIZE = 100;
- for (let i = 0; i < rowAttributes.length; i++) {
- await api.dbTableRow.bulkCreate(
- 'noco',
- context.base.id,
- table.id,
- rowAttributes.slice(i * BATCH_SIZE, i * BATCH_SIZE + BATCH_SIZE)
- );
+ for (let i = 0; i < rowAttributes.length; i += BATCH_SIZE) {
+ await api.dbTableRow.bulkCreate('noco', context.base.id, table.id, rowAttributes.slice(i, i + BATCH_SIZE));
}
return table;
}