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...
Germany
Slovakia
Canada
Brazil
Singapore
Hungary
Philippines
Mexico
Thailand
Ukraine
Luxembourg
Estonia
Lithuania
Norway
Chile
United States
Great Britain
India
Spain
South Korea
Ecuador
Colombia
Taiwan
Switzerland
Indonesia
Cyprus
Denmark
Finland
Poland
Malta
Czechia
New Zealand
Austria
Turkey
France
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Malaysia
South Africa
Netherlands
Bulgaria
Latvia
Australia
Japan
Russia