From 1848abd11385765d00a6b8051a14c4ce5dee364d Mon Sep 17 00:00:00 2001 From: Chris Veleris Date: Mon, 17 Nov 2025 13:11:28 +0200 Subject: [PATCH] Add tests for subtask handling --- .../tests/integration/subtask-ordering.test.js | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/backend/tests/integration/subtask-ordering.test.js b/backend/tests/integration/subtask-ordering.test.js index 86d1bc9..deffd2e 100644 --- a/backend/tests/integration/subtask-ordering.test.js +++ b/backend/tests/integration/subtask-ordering.test.js @@ -325,15 +325,13 @@ describe('Subtask Ordering', () => { // Add subtasks in multiple concurrent requests const promises = [ - agent - .patch(`/api/task/${createResponse.body.id}`) - .send({ - name: 'Parent Task', - subtasks: [ - { name: 'Batch 1 - Task 1', isNew: true }, - { name: 'Batch 1 - Task 2', isNew: true }, - ], - }), + agent.patch(`/api/task/${createResponse.body.id}`).send({ + name: 'Parent Task', + subtasks: [ + { name: 'Batch 1 - Task 1', isNew: true }, + { name: 'Batch 1 - Task 2', isNew: true }, + ], + }), // Note: This test demonstrates the limitation - concurrent updates // may result in inconsistent state. In practice, the UI prevents this. ];