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?

  • Which sessions in particular are you referring to? Can you link to them? Several of them touched on Jasmine. – Adrian Larson Feb 28 '17 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. – Karthikeya Pammi Mar 1 '17 at 0:43
  • Here is the link: youtube.com/watch?v=Gh-FtOIsejA&t=1382s – Karthikeya Pammi Mar 1 '17 at 0:44
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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.