AlexKMarshall / regMan

CRM to manage registrations to summer camps
MIT License
2 stars 0 forks source link

Test/api client #85

Closed AlexKMarshall closed 4 years ago

AlexKMarshall commented 4 years ago

Testing and refactoring the api client. Extracting the common functionality into a single "client()" function.

Installed Mock Service Worker for testing that the api calls work. See https://mswjs.io/docs/getting-started/mocks and https://kentcdodds.com/blog/stop-mocking-fetch

This is also introduces react-query for fetching and caching server data

codecov[bot] commented 4 years ago

Codecov Report

Merging #85 into master will increase coverage by 0.49%. The diff coverage is 53.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   33.16%   33.66%   +0.49%     
==========================================
  Files          44       46       +2     
  Lines         600      612      +12     
  Branches       54       55       +1     
==========================================
+ Hits          199      206       +7     
- Misses        367      371       +4     
- Partials       34       35       +1     
Impacted Files Coverage Δ
...omponents/Dashboard/GroupsDisplay/GroupsDisplay.js 76.81% <0.00%> (ø)
client/src/test/server/server-handlers.js 50.00% <50.00%> (ø)
client/src/services/ApiClient.js 33.33% <55.55%> (+9.80%) :arrow_up:
client/src/test/server/test-server.js 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 6ba879b...bf23571. Read the comment docs.