JavaScript Testing - Mocking Async Code

  • 2018-10-20 10:21 PM
  • 68

Testing async JavaScript code or testing JS dependencies in general can be difficult. But "mocking" is a technique that can easily be implemented with Jest to make JavaScript testing a breeze again.


Starting Code: https://github.com/academind/js-testing-introduction/tree/87dbda7afbe52aa315cb049c4cdd016bd19af1cd
Finished Code: ☞ JavaScript programming: JavaScript for beginners
Learn JavaScript in no time: ☞ Learn How To Become a JavaScript Developer from Scratch

Want to learn something totally different? Check out all other courses: ☞ Javascript for Beginners Learn by Doing Practical Exercises

Academind is your source for online education in the areas of web development, frontend web development, backend web development, programming, coding and data science! No matter if you are looking for a tutorial, a course, a crash course, an introduction, an online tutorial or any related video, we try our best to offer you the content you are looking for. Our topics include Angular, React, Vue, Html, CSS, JavaScript, TypeScript, Redux, Nuxt.js, RxJs, Bootstrap, Laravel, Node.js, Progressive Web Apps (PWA), Ionic, React Native, Regular Expressions (RegEx), Stencil, Power BI, Amazon Web Services (AWS), Firebase or other topics, make sure to have a look at this channel or at academind.com to find the learning resource of your choice!