Hello, I'm currently working on a simple test:
define(["angular", "angularMocks", "app", "normalizer"], function(angular, mocks, app) {
describe("service: normalizer", function () {
var normalizerService;
beforeEach(module("ADB"));
beforeEach(inject(function(_normalizer_) {
normalizerService = _normalizer_;
}));
var params = {};
var metadata = {};
var data = {};
var response = normalizerService.topLanguagesHybrid(metadata, data, params);
var type = typeof response;
expect(type).toEqual("object");
});
});
Unfortunately, the issue I'm having is that the normalizer service isn't being set up properly. In the console, I'm getting this error message:
TypeError: 'undefined' is not an object (evaluating 'normalizerService.topLanguagesHybrid')
Important Note: I am using requirejs in this project and I've confirmed that the normalizer service file is being loaded into the browser along with all its dependencies. It seems like it's just not getting injected correctly. What could be causing this problem?