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