exam questions

Exam Certified Platform Developer II All Questions

View all questions & answers for the Certified Platform Developer II exam

Exam Certified Platform Developer II topic 1 question 265 discussion

Actual exam question from Salesforce's Certified Platform Developer II
Question #: 265
Topic #: 1
[All Certified Platform Developer II Questions]

A lead developer is creating tests for a Lightning web component. The component re-renders when a property called bypassSelection changes its value.

What should the developer use to test that the component re-renders successfully when the property changes?

  • A. Window.setInterval()
  • B. Window.setState()
  • C. dispatchEvent (new CustomEvent(‘bypassSelection’))
  • D. Promise.resolve()
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
bclayton
Highly Voted 10 months, 4 weeks ago
Answer should be D. https://developer.salesforce.com/docs/component-library/documentation/en/lwc/lwc.unit_testing_using_jest_patterns
upvoted 5 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago