To run the app:
npm start
To build the app:
npm run build
To run the tests:
npm run test
-
Header
- Logo
- Nav Items
-
Body
- Search
- RestaurantContainer
- RestaurantCard
- img
- Name of Restaurant, Star Rating, Cuisine, Delivery Time
-
Footer
- Copyright
- Links
- Address
- Contact
- Install React Testing Library
- Install Jest
- Install Jest dependency Babel
- Configure Babel
- Configure Parcel config file to disable default Babel transpilation
- Jest -
npx jest --init
- Install jsdom library
- Install
@babel/preset-react
to make JSX work in test cases - Include
@babel/preset-react
inside Babel configuration
- Add this to
babel.config.js
:['@babel/preset-react', { runtime: "automatic" }]
- Install Jest DOM:
npm i -D @testing-library/jest-dom