Writing tests for a YouTubeSearchApp

In this section, we will explore how to write a complete unit test suite for the YouTubeSearchApp that we created in Chapter 8Debugging Lightning Components (see https://github.com/PacktPublishing/Learning-Salesforce-Lightning-Application-Development/tree/master/chapter8).

To create a scratch Org with the code samples, go through the following commands in your DX project:

$ git clone https://github.com/PacktPublishing/Learning-Salesforce-Lightning-Application-Development.git  //clone the repo$ cd Chapter8 //cd into the chapter8 folder$ sfdx force:auth:web:login -d -a DevHub //auth into Dev Hub$ sfdx force:config:set defaultdevhubusername=DevHub // Set as default$ sfdx force:org:create -s -f config/project-scratch-def.json ...

Get Learning Salesforce Lightning Application Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.