In today's blog we will discuss some testing tools of react apps .In general we write code to work, but now a days only writing a code is not enough , it should be less complex and more accurate ,efficient too . 1. ESLINT :- There are so many formats in which java Scripts code is written now a days by different developer so before developing a project coding styles parameters are being set for the react apps .(here react app means , reactjs and react native) . example - function add(x, y){ return x+y ; } ES6 syntax - const add = (x, y) => { return x+y } Both syntax are correct but setting a parameter is vary important . That's what is done by eslint; It is also use for the testing of a function : example - // App.js function add(x, y) { return x+y; } 2. console.log testing :- test : console.warn(add(1,2) === 3 , "this is a error function"); console.warn(add(1,6) === 7 , "this is a error function"); con...
Comments