https://github.com/bk408/blog-test-app
https://github.com/bk408/blog-test-app
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/bk408/blog-test-app
- Owner: bk408
- Created: 2024-04-18T16:00:33.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-05-05T16:26:37.000Z (about 1 year ago)
- Last Synced: 2025-01-21T08:13:01.166Z (4 months ago)
- Language: JavaScript
- Size: 610 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repository contains various types of test cases.
# Theoretical Part
MSW => Mock Service worker
It is used to mocking and testing the API => mocking the api means it create a dummy data of api because when we fetch the data
from an api we got some result, might be response is short or larger or may be there is some issue with response. so avoid
this issue msw create a dummy data of response and start testing on it.Note: react-testing-library is also used msw in their official documentation and they recommend to use MSW
# API testing with MSW process
1. install MSW
2. make mock service folder
3. make server file
4. make server handler file
5. write code for api testing
6. call server in test setup file