Skip to content

Sample react project to demonstrate how we can stub APIs by leveraging their OpenAPI specifications with Specmatic in Jest UI component testing.

Notifications You must be signed in to change notification settings

znsio/specmatic-order-ui-react

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

99 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

React Jest UI Component Testing with Specmatic

This project demonstrates stubbing APIs with Specmatic by leveraging their OpenAPI sepcifications in Jest UI Component Tests.

Install dependencies

npm install

Running the app

npm start

Running UI Component Tests

npm test

Updating the stub expectations

https://specmatic.in/documentation/test_data_format.html Refer to this in order to understand how to update the stub.

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.

About

Sample react project to demonstrate how we can stub APIs by leveraging their OpenAPI specifications with Specmatic in Jest UI component testing.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published