Install jsTestDriver plugin for IntelliJ
Ensure that the following files exist within your project
- jquery-1.8.3.js
- jasmine-1.1.0.js *
- JasmineAdapter-1.1.2.js *
- angular-resource.js
- angular-mocks.js
Create a .jstd file in your project folder.(eg ‘TestConfig.jstd’).The file should be something like this
Create a test file. Write your test cases using Jasmine and run them using JsTestDriver plugin.
Note: if u add angular-mocks.js before jasmine, on running the tests, you may get a reference error - module/inject not defined
* while writing the test cases, IntelliJ prompts to add JasmineAdapter and jasmine you could add them then as well