I try to test the code below:
describe(\'myService test\', function () {
describe(\'when I call myService.one\', function () {
beforeEach(angular.mod
The line where you have
beforeEach(angular.module('TargetMarketServices'));
should be
beforeEach(module('TargetMarketServices'));
If you take a look at the angular-phonecat project in test/unit/directivesSpec.js it uses
beforeEach(module('myApp.directives'));
If I modify it to use angular.module instead:
beforeEach(angular.module('myApp.directives'));
then I get this error when running testacular also:
TypeError: 'undefined' is not a function (evaluating 'this.func.apply(this.spec)')
AngularJS provides two testing libraries:
angular-mocks is used for Jasmine and Karma testing. It publishes global methods module() and inject() to be used in your Jasmine spec tests. This means you must load the angular-mocks.js script (after you load the angular.js library/script)
angular-scenario is only used for e2e testing.