LWCBeginnerdeploymenttestingjest
How do you deploy and test LWCs?
Real World Scenario
Your component works locally in VS Code but fails in sandbox. You describe LWC dev workflow basics.
Expected Answer
• Develop with Salesforce CLI and VS Code, push source to scratch org or sandbox
• Jest tests (sfdx-lwc-jest) unit test JavaScript logic offline
• Add component to Lightning App Builder page or flexipage metadata for visibility
• Verify profiles and permission sets grant access to Apex and custom metadata used
• Use browser dev tools and component inspector for runtime issues
Follow-Up Questions & Answers
Click to expand — each follow-up includes a direct, interview-ready answer
Full integration with live Salesforce data and wire adapters—supplement with manual or UI tests in org.
Architect Perspective
Deployment issues are often metadata visibility—not JS syntax. Mention flexipage and permissions.