logo
logo
Sign in

Lightning Component Testing Jasmine

avatar
cloud Analogy
Lightning Component Testing Jasmine

Before we start to provide you with some insights testing Lightning components with Jasmine, first and foremost, what comes to our mind is “What is Jasmine?”. Jasmine is a behavior-driven development framework – that is used for the purpose of testing Javascript code. If Jasmine is adopted for testing of Lightning components, then there are obviously some advantages for this. Let us throw some light on the advantages:

What are the Advantages?

Some advantages that Jasmine offers are:

  • It is built easy to set up and it is possible to set up in any scenario
  • It has no requirement for DOM
  • It has no dependency on any other Javascript framework
  • It helps to write tests in easy steps because it comes with clean syntax

In this post, we will provide you with some insights on how Jasmine is used for testing the Lightning components. But to begin with we need to understand “What is Lightning Test Services ?”.

What is Lightning Test Services?

Jasmine and Mocha are widely accepted all throughout the Javascript world. Salesforce has come with a new concept Lightning Test Services (LTS)LTS is a set of tools and services – that create test suites for these Lightning components. It helps in the validation of the client-side behaviour of these components. You can install LTS in your Salesforce org in the following two ways:

  • As an unmanaged package
  • Install LTS by using a command in Salesforce Developer Experience(SFDX)
collect
0
avatar
cloud Analogy
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more