简体   繁体   中英

Whether Jest is used only for unit testing the React Js code or it can be used to UI Test the React Js application?

I've got a Test Automation requirement for the React JS application. Its a Retail Web based application, I Would like to know whether jest can be used for Automating the UI of the reactjs application

When a application is unit tested it actually not deployed or running. It usually build phase of application when unit testing is done before deployment. So how an application can be tested ? It is the JEST which runs your react code for unit testing or you can say it what mount you components so that you can run unit test on those components.

So its a unit testing api from airbnb.com.

If you are looking for selenium kind of alternative you can use Protractor for react app which is widely used.

You can write unit testing as well as integration test with Jest. also, you can configure an enzyme library for shallow dom testing, snapshot testing and many more. There are a lot of benefits to jest beyond testing.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM