return true/false not in same dir i have test2.js in which i called if(getData()) { return true;
}
so while i was testing file test2 with jest its giving me error getData() id not defined
can any one help me how can solve this ?
That's because getData() function in test1.js not in test2.js so you need to use es6 future import test1.js in test2.js so you can use it in test2.js
Обсуждают сегодня