Skip to content

Test fix#60

Merged
PCBZ merged 7 commits intomainfrom
test_fix
Apr 25, 2025
Merged

Test fix#60
PCBZ merged 7 commits intomainfrom
test_fix

Conversation

@PCBZ
Copy link
Copy Markdown
Owner

@PCBZ PCBZ commented Apr 24, 2025

No description provided.

@PCBZ PCBZ requested a review from Copilot April 25, 2025 03:27
@PCBZ PCBZ self-assigned this Apr 25, 2025
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR, titled "Test fix", updates and standardizes several test files to align with new error response formats and updated testing practices for both client and server code.

  • Updated client tests to use MemoryRouter and mock auth services properly.
  • Revised server tests to validate error responses consistently and updated API payloads (e.g. donorIds instead of donors).
  • Refactored CI workflow, Jest config, and helper utilities to support these changes.

Reviewed Changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated no comments.

Show a summary per file
File Description
client/src/App.test.jsx Replaced BrowserRouter with MemoryRouter and added auth mocks.
Server/test/* Updated error assertions and API endpoint tests for auth errors.
Server/test/helpers/testSetup.js Added error handling for soft delete operations.
Server/jest.config.js Converted to ES module export style.
.github/workflows/ci.yml Updated CI steps for Node.js, client build, and server tests.
Server/test/donor/importDonor.test.js Entire file removed, indicating potential deprecation.
Files not reviewed (2)
  • client/package-lock.json: Language not supported
  • client/package.json: Language not supported
Comments suppressed due to low confidence (2)

Server/test/donorList/addDonors.test.js:261

  • The test 'should handle multiple donors in a single request' sends only one donor ID. Consider updating the payload to include multiple donor IDs to accurately test the intended functionality.
donorIds: [

Server/test/donor/importDonor.test.js:1

  • The entire donor import test file has been removed. If donor import functionality is still supported, please ensure that updated tests are added to maintain coverage.
import request from 'supertest';

@PCBZ PCBZ added the bug Something isn't working label Apr 25, 2025
@PCBZ PCBZ merged commit aab0490 into main Apr 25, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants