5

I am trying to run our JavaScript tests (written with Jasmine) inside LockerService. I know Salesforce did the same with jQuery in the past because they mentioned it during the last Dreamforce event.

What would be the best way to achieve this? Anyway I could use the Aura framework Github project and hook it to my CI?

3
  • Which sessions in particular are you referring to? Can you link to them? Several of them touched on Jasmine.
    – Adrian Larson
    Feb 28, 2017 at 22:18
  • Bob Buzzard gave a talk about running Unit tests using Jasmine. He mentioned that he had to do some changes in the Jasmine source as it is not strictly lockerservice compliant. Mar 1, 2017 at 0:43
  • Here is the link: youtube.com/watch?v=Gh-FtOIsejA&t=1382s Mar 1, 2017 at 0:44

2 Answers 2

3

There is a POC for using jasmine for component level functional tests at, https://github.com/esalman-sfdc/lighning-test-service-poc

Safe Harbor: We (salesforce) are planning to showcase a more elaborate locker service compliant version of this soon via an official repo (e.g. a repo under github.com/forcedotcom) with more examples soon.

I can update this thread once that happens if you are interested.

1
0

Take a look at the below github package.this demonstrates how jasmine can be used to test with lightning components. This has been presented in dreamforce as well.

https://github.com/keirbowden/LtgJasmineUnitTesting

Youtube link:

https://www.youtube.com/watch?v=Gh-FtOIsejA

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .