Skip to content

Adding api call and tests to propertyListings component#22

Open
Cm290 wants to merge 1 commit intorightmove:masterfrom
Cm290:adding-api-call-to-property-listings
Open

Adding api call and tests to propertyListings component#22
Cm290 wants to merge 1 commit intorightmove:masterfrom
Cm290:adding-api-call-to-property-listings

Conversation

@Cm290
Copy link
Copy Markdown

@Cm290 Cm290 commented Feb 16, 2025

  • Replacing the dummy data with a call to the API
  • Adding a loading and empty state to the component
  • Adding the 'msw' library to mock the api calls in test
  • Replacing 'jest-environment-jsdom' with 'jest-fixed-jsdom' as a workaround to allow the use of 'msw' (This should do the exact same thing, but reintroduces Node.js modules ooriginally replaced with polyfills in 'jest-environment-jsdom', explanation here: https://mswjs.io/docs/migrations/1.x-to-2.x/#frequent-issues)
  • Corrected test to account for new implementation of api call
  • Added tests for Loading state, Empty state and Error state

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