Testing - Slenderware/slenderpm GitHub Wiki

Tesing

Intro

For each controller a certain set of test cases have been written to test data, UI and http components of the website. The testing is power by Karma using Jasmine syntax.

To run the test cases, navigate to the project directory using a console. And type the following:

grunt test

All the test cases will execute and report back with the test results. Test cases will also be ran when executing the grunt command.

Directory

The test cases are located in the test directory structure in the project root and configured by the file called karma.conf.js located in the test folder.

Example Test Case code

it('loginModule username failed to initialize', function () { scope.username = 'dummy'; expect(scope.username).toBe('dummy'); });