Write a Jest Test for Wire Service | Lightning Web Components Tests

Published: 05 November 2022
on channel: Saurabh Infotech Solutions
3,001
4

#salesforce
#trailhead
#salestraining

Lightning Web Components Tests

Write a Jest Test for Wire Service
Learning Objectives
After completing this unit, you'll be able to:

List the three primary adapters for wire services.
Explain mocking data for the wire service.
Understand reactive variables and their effect.
Testing @Wire Service
Lightning web components use a reactive wire service built on Lightning Data Service to read Salesforce data. Components use @wire in their JavaScript class to read data from one of the wire adapters in the lightning/ui*Api modules.

The wire service is reactive in part because it supports reactive variables. Reactive variables are prefixed with a $. When a reactive variable changes, the wire service provisions new data. If the data exists in the client cache, a network request may not be involved.


Watch video Write a Jest Test for Wire Service | Lightning Web Components Tests online without registration, duration hours minute second in high quality. This video was added by user Saurabh Infotech Solutions 05 November 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 3,001 once and liked it 4 people.