Note : Everything we are discussing here is completely covered as part of Live coding in Apex Salesforce Saturday organized by Amit. Would like to thank Mohith for his support and answers during the demo. It also shows How SalesforceDX can be used daily by developers to perform development.
Once Jasmine is installed, you can navigate in your browser to open Jasmine test runner page using URL https://<YourDomain>.lightning.force.com/c/jasmineTests.app
SFDX Command to open Jasmine Test runner in Salesforce
sfdx force:org:open -p /c/jasmineTests.app
Let’s consider below Lightning component to be used by Lightning Test Service (LTS)
This Lightning Component uses lightning:datatable component and populates it on basis of input provided.
Once, static resource is uploaded in Salesforce, we need to add reference of this static resource in JasmineTests.app . In our case, static resource name is JasmineTestDatatable. This Test runner application comes as part of Lightning Test Service. Same way, MochaTest runner app also comes as part of LTS.
It is time to open Jasmine Test runner using URL https://<YourDomain>.lightning.force.com/c/jasmineTests.app. We would be able to see below output
Youtube Video of Lightning Test Service (LTS)