Salesforce
PDII · Question #297
A developer has created a Lightning web component that uses the getRecord wire adapter. Which three things should the developer do in a Jest test to validate the wire method is working as expected?…
The correct answer is C. Use the emit() API. D. Create a JSON file with mock data. E. Import getRecord from lightning/uiRecordApi. See the full explanation below for the reasoning.
Question
A developer has created a Lightning web component that uses the getRecord wire adapter. Which three things should the developer do in a Jest test to validate the wire method is working as expected? (Choose three.)
Options
- AUse an assert statement to validate results.
- BImport wire from lwc.
- CUse the emit() API.
- DCreate a JSON file with mock data.
- EImport getRecord from lightning/uiRecordApi.
How the community answered
(22 responses)- A5% (1)
- B14% (3)
- C82% (18)
Community Discussion
No community discussion yet for this question.