cd backend npm install -D vitest supertest
Please add this test script to your package.json:

Pressure-test the backend to ensure the API is secure and resilient against invalid data or unauthorized access.
Specific Test Cases:
Privacy Check: Verify that User A cannot GET, PATCH, or DELETE a task belonging to User B (expect 404 Not Found or 403 Forbidden).
Validation Check: Ensure the API rejects requests missing a title or using an invalid status enum (expect 400 Bad Request).
Auth Guard: Confirm that requests without a valid authCookie are rejected (expect 401 Unauthorized).
Cleanup Verification: Prove that the DELETE endpoint actually removes the record from MongoDB by checking the database directly in the test.
cd backend npm install -D vitest supertestPlease add this test script to your package.json:

Pressure-test the backend to ensure the API is secure and resilient against invalid data or unauthorized access.
Specific Test Cases:
Privacy Check: Verify that User A cannot GET, PATCH, or DELETE a task belonging to User B (expect 404 Not Found or 403 Forbidden).
Validation Check: Ensure the API rejects requests missing a title or using an invalid status enum (expect 400 Bad Request).
Auth Guard: Confirm that requests without a valid authCookie are rejected (expect 401 Unauthorized).
Cleanup Verification: Prove that the DELETE endpoint actually removes the record from MongoDB by checking the database directly in the test.