SharePoint.Jasmine - Test your JavaScript directly inside your App

Today I've published SharePoint.Jasmine on github and NuGet which allows you to test your JavaScript code directly inside of a SharePoint App. By installing SharePoint.Jasmine into your project using

Install-Package SharePoint.Jasmine

All required artefacts for executing JavaScript UnitTests using Jasmine are automatically integrated into your App project. The updated App structure will look like the following

Most important is the actual test page located in Pages/tests

The index.aspx file is responsible for loading the Jasmine Test-Runner, the Specs and all the JavaScript source files you're interested in. By default I've added the Jasmine-Sample folder which gives you a rough introduction in how to write JavaScript UnitTests using Jasmine. When installing the App and navigating to the Test-Runner-Site you'll receive the test results embedded in the default SharePoint MasterPage.

Keep on testing your code :)

Comments

comments powered by Disqus