I have defined my modules and tests as shown below, but I encounter an issue when attempting to inject ContentBlocksService into the beforeEach(mock.inject((ContentBlocksService)... statement. It shows an error message saying Unknown provider ContentBlocksServiceProvider... Any suggestions?
Modules:
module projName.ContentBlocks {
"use strict";
console.log("contentBlocks.module: start");
angular.module("projName.contentBlocks", [
"ui.router",
"ui.bootstrap",
"ui.bootstrap.tpls",
"textAngular",
"as.sortable",
// shared modules
"projName.filters"
])
.service("ContentBlocksService", ContentBlocksService)
// etc
}
Tests:
module projName.ContentBlocks {
"use strict";
describe("ContentBlocksDetailPageService", () => {
beforeEach(mock.inject((_$http_, _$log_, _$q_, _$httpBackend_, _$rootScope_) => {
log = _$log_;
httpMock = _$httpBackend_;
alertService = new Shared.AlertService(_$q_, _$log_);
$q = _$q_;
$http = _$http_;
$rootScope = _$rootScope_;
}));
/// etc