Install enzyme, and enzyme-adapter-react-16 using npm Add the following to setupTests.js file of your project import { configure } from 'enzyme' ; import Adapter from 'enzyme-adapter-react-16' ; configure ({ adapter : new Adapter () }); Here is a basic test import React from 'react' ; import { mount } from 'enzyme' ; import Note from './Note' ; const props = { note : "Test Note" , index : 0 , removeHandler : jest . fn () } describe ( 'Note' , () => { let note = mount ( < Note { ... props } /> ); it ( "renders the note text" , () => { ...
Project Weekay | Resume | LinkedIn Profile
NodeJS, AWS, MongoDB, ReactJS, Django, Python, ML with Scikit Learn, Matplotlib, Seaborn
Engineering, UX, Marketing, Product Designing, Business
sayhellotovinit@gmail.com | +91 99239 08880 | Pune, India