Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [jasmine]

Jasmine is a behavior-driven development framework for testing JavaScript code. The Lightning Testing Service has built in wrappers for Jasmine.

0
votes
0answers
17 views

“TypeError: component.find is not a function” When trying to test by using LTS: Jasmine install through sfdx

Since I have install jasmine LTS from sfdx am using jasmine/2.6.1 . Write a test as said in the example for c:egGlobalValueProvider But I am getting an error in scratch org :TypeError: component.find ...
2
votes
0answers
203 views

Lightning Component Testing Code Coverage

I need some help here with lightning component testing. So I'd been building lightning component test on Salesforce using Jasmine testing framework. I was wondering if anyone here successfully ...
0
votes
1answer
117 views

how to test handler action and promise within jasmine and Lightning test service

component handler which is need to be call <aura:handler name="init" value="{!this}" action="{!c.getLoginUrls}" /> Component method ({ getLoginUrls : function(component, event, ...
3
votes
1answer
293 views

Testing Lightning component that fires event based upon a child component's `onchange` action

I'm trying to write Jasmine/LTS tests for a component that embeds a <lightning:combobox>. The method I'm attempting to test fires a component event within a controller method that is bound to ...
6
votes
1answer
332 views

How to use lightning testing service without using Salesforce DX?

I am working on a salesforce managed package project which is not in DX. I want to start writing unit test cases for lightning component using lightning test service. I have gone through the github ...
7
votes
0answers
193 views

Is is possible to spyOn a helper function in a Lightning Testing Service (LTS) test?

In How to mock or configure lightning:workspaceAPI in Lightning Testing Service (LTS) tests? the answer suggests using Jasmine's spyOn to call a fake function in a test and so work-around an API that ...