Testing the code is an important step when developing an application. The testing process should be carried out carefully to ensure the quality of the application. There are a number of automated testing tools available in the industry, which enhance the software stability and quality by catching more errors before the software reaches the end user. Especially with JavaScript, the choices are more. In this chapter, we will be discussing how to test an Electron application. If you are new to JavaScript testing, the first part of this chapter will give you a brief introduction to JavaScript testing, which is essential to test your application. The following points will be discussed in this chapter:
- Introduction to JavaScript testing
- Testing the Electron application with Spectron
- Exploring the Spectron API
The chapter covers, mostly, a testing library called Spectron based on Chrome driver and WebDriverIO. Spectron can work with any other testing framework...