Creating a Lightning Component test via CLI

Let's create a test for the YoutubeSearchApp using the SFDX command line, as shown in the following code:

sfdx force:Lightning:test:create -n YoutubeSearchAppTest -d./force-app/main/default/staticresources

Upon running this command, you will notice that a JavaScript file with a describe function template is added in the staticresources folder.

We will write the test suite here and then reference them back in the jasmineTests.app test application.

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.