Creating unit tests for code components helps in quickly figuring out issues with the component when a piece of code is redesigned or additional logic is added to enhance the functionality. Unit tests test a single function or object in isolation. Salesforce provides Apex unit tests for all the backend business logic written in Apex. For Lightning Components, Salesforce provides the Lightning Testing Service (LTS). The LTS is a set of wrappers for Jasmine and Mocha JavaScript testing frameworks. Jasmine is a popular framework to test JavaScript applications on, and uses a wide set of features, assisting in behavior-driven development (BDD), while Mocha is an emerging framework and requires additional frameworks (such as Chai, Sinon, or Cucumber) to work with it in order to provide a complete toolset to use to write unit tests. In...

Learning Salesforce Lightning Application Development
By :

Learning Salesforce Lightning Application Development
By:
Overview of this book
Built on the Salesforce App Cloud, the new Salesforce Lightning Experience combines three major components: Lightning Design System, Lightning App Builder, and Lightning Components, to provide an enhanced user experience. This book will enable you to quickly create modern, enterprise apps with Lightning Component Framework.
You will start by building simple Lightning Components and understanding the Lightning Components architecture. The chapters cover the basics of Lightning Component Framework semantics and syntax, the security features provided by Locker Service, and use of third-party libraries inside Lightning Components. The later chapters focus on debugging, performance tuning, testing using Lightning Testing Services, and how to publish Lightning Components on Salesforce AppExchange.
Table of Contents (17 chapters)
Preface
Introduction to the Lightning Component Framework
Exploring Salesforce DX
Lightning Component Building Blocks
The Lightning JavaScript API
Events in the Lightning Component Framework
Lightning Data Service and Base Components
Using External JavaScript Libraries in Lightning Components
Debugging Lightning Components
Performance Tuning Your Lightning Component
Taking Lightning Components out of Salesforce Using Lightning Out
Making Components Available for Salesforce Mobile and Communities
Lightning Navigation and Lightning Console APIs
Unit Testing Lightning Components
Publishing Lightning Components on AppExchange
Other Books You May Enjoy
How would like to rate this book
Customer Reviews