#salesforce
#trailhead
#salestraining
Lightning Web Components Tests
Set Up Jest Testing Framework
Learning Objectives
After completing this unit, you'll be able to:
Describe the Jest test framework.
Describe the role of Node.js and npm.
Install Node.js and npm.
Install the @salesforce/sfdx-lwc-jest JavaScript module in a Salesforce DX project.
Before You Begin
To complete this module, you need Salesforce CLI, Visual Studio Code, and Salesforce Extensions for Visual Studio Code installed and updated. To fulfill these prerequisites, we recommend that you complete the Quick Start: Salesforce DX, Quick Start: Visual Studio Code for Salesforce Development, and Quick Start: Lightning Web Components projects before you go on.
We're taking a test-driven development (TDD) approach, where we'll write the Jest test before we write the component that it tests. Because of this, each test will initially fail. Then we'll update the component to get the Jest test to pass.
Watch video Set Up Jest Testing Framework | Lightning Web Components Tests online without registration, duration hours minute second in high quality. This video was added by user Saurabh Infotech Solutions 04 November 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 7,346 once and liked it 5 people.