https://github.com/znsio/specmatic-order-ui-react
Sample react project to demonstrate how we can stub APIs by leveraging their OpenAPI specifications with Specmatic in Jest UI component testing.
https://github.com/znsio/specmatic-order-ui-react
Last synced: about 1 year ago
JSON representation
Sample react project to demonstrate how we can stub APIs by leveraging their OpenAPI specifications with Specmatic in Jest UI component testing.
- Host: GitHub
- URL: https://github.com/znsio/specmatic-order-ui-react
- Owner: znsio
- Created: 2023-05-21T08:39:46.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-16T01:09:40.000Z (about 2 years ago)
- Last Synced: 2024-04-16T08:50:05.513Z (about 2 years ago)
- Language: JavaScript
- Size: 2.38 MB
- Stars: 0
- Watchers: 7
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README

# React Jest UI Component Testing with Specmatic
This project demonstrates stubbing APIs with Specmatic by leveraging their OpenAPI specifications in Jest UI Component Tests.
## Install dependencies
```shell
npm install
```
### Start the application
```shell
npm start
```
## Running automated UI Component tests with Specmatic
```shell
npm test
```
## Updating the stub expectations
Refer to this [documentation](https://specmatic.io/documentation/test_data_format.html) in order to understand how to update the stub expectations.
## FAQs
### 1. Error `ReferenceError: setImmediate is not defined`
This happens due to an issue in Jest. The easiest solution is to import `core-js` in the affected test file.