Skip to content

ATLAS-5179, ATLAS-5180: Add unit tests for API layer, utils, and Redux#633

Open
pawarprasad123 wants to merge 1 commit into
masterfrom
ATLAS-5179
Open

ATLAS-5179, ATLAS-5180: Add unit tests for API layer, utils, and Redux#633
pawarprasad123 wants to merge 1 commit into
masterfrom
ATLAS-5179

Conversation

@pawarprasad123
Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

This PR adds automated tests for data-access and shared state/helpers. It validates HTTP wrappers, URL constants, pure utilities, and Redux slices without mounting full pages.

What changes do

  • src/api/apiMethods/__tests__/**: Exercises API methods (success/error paths, headers, fetchApi usage) so refactors do not break server integration contracts.
  • src/api/apiUrlLinks/__tests__/**: Locks URL shapes (paths, query params) so env-specific or versioned endpoints stay correct.
  • src/utils/__tests__/**: Tests formatting, parsing, navigation helpers, and error-message helpers used across views.
  • src/redux/**/__tests__/**: Tests reducers/selectors/async thunks where covered—guards global state behavior used by containers.

Why these files are used

  • Failures here usually mean broken API calls, wrong links, or subtle state bugs that would surface as flaky UI; fixing at this layer is cheaper than debugging full screens.

How was this patch tested?

Manual test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant