Salesforce Developer Tutorial (LWC) - The Complete Guide to LWC Jest Tests in 2023

Опубликовано: 17 Октябрь 2024
на канале: Coding With The Force
8,984
218

In this episode we go over absolutely everything you need to know about writing jest tests for your Lightning Web Components!

Please consider donating to help continue to improve the content produced for Coding With The Force: https://www.paypal.com/donate?busines...

Get Coding With The Force Merch Here: https://my-store-d20559.creator-sprin...

Github Wiki: https://github.com/Coding-With-The-Fo...

Github Code Examples: https://github.com/Coding-With-The-Fo...

Information on Promises: https://www.freecodecamp.org/news/jav...

Follow all of our social media here:

Patreon:   / codingwiththeforce  
Github: https://github.com/Coding-With-The-Force
Facebook:   / codingwiththeforce  
Twitter:   / coding_force  
Instagram:   / codingwiththeforce  

Salesforce development books I recommend:

Advanced Apex Programming: https://amzn.to/3lXi8to
Salesforce Lightning Platform Enterprise Architecture: https://amzn.to/2R0D4BQ
Mastering Salesforce DevOps: https://amzn.to/3lTtTRN

Good Non-SF Specific Development Books:

Clean Code: https://amzn.to/35PuMDU
Clean Architecture: https://amzn.to/35FYo6A

-----------------------------------------------------------------------------------------------------------------------

Table of Contents:

0:00 - Intro
0:59 - What are Jest Tests and why write them?
2:51 - How to setup your machine to run Jest Tests
5:13 - How to setup your SF Project to run Jest Tests
11:07 - Learning the basics of Jest Tests
18:11 - How to run Jest Tests
24:00 - How to test LWC Bind Variables
27:57 - The beforeEach method
37:41 - How to test Events and Conditional Rendering
51:11 - The afterEach method
56:08 - How to test Iterators
1:09:50 - How to test Apex wire methods
1:38:26 - How to test Standard wire methods
1:48:57 - How to test Apex Method Calls
2:06:59 - How to test a Child LWC
2:15:23 - Outro

DISCLAIMER: The views and ideas expressed on this YouTube channel and blog are based on past development experiences and may not always work for your particular scenarios. The advice in these videos may also become outdated as technology advances. They should be used as examples for educational purposes only. Using any shown solutions in your own org is not advisable since they are example scenarios.

#salesforce #salesforcedeveloper #salesforceadmin