Salesforce
PDII · Question #360
PDII Question #360: Real Exam Question with Answer & Explanation
Sign in or unlock PDII to reveal the answer and full explanation for question #360. The question stem and answer options stay visible for context.
Question
A developer is writing a Jest test for a Lightning web component that conditionally displays child components based on a user's checkbox selections. What should the developer do to properly test that the correct components display and hide for each scenario?
Options
- AAdd a teardown block to reset the DOM after each test.
- BCreate a new jsdom instance for each test.
- CCreate a new describe block for each test.
- DReset the DOM after each test with the afterEach() method.
Unlock PDII to see the answer
You've previewed enough free PDII questions. Unlock PDII for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.