This Initializer seems to be working as far the actual application goes but when I go to run the unit test for it I always get an error.
TypeError: application.inject is not a function
Any help would be greatly appreciated. Thanks
initializers/language.js
export function initialize(application) {
application.inject('adapter', 'language', 'service:language');
}
export default {
name: 'language',
initialize: initialize
};
initializers-test.js
import Ember from 'ember';
import { initialize } from '../../../initializers/language';
import { module, test } from 'qunit';
var registry;
var application;
module('Unit | Initializer | language', {
beforeEach: function() {
Ember.run(function() {
application = Ember.Application.create();
registry = application.registry;
application.deferReadiness();
});
}
});
// Replace this with your real tests.
test('it works', function(assert) {
initialize(registry, application);
// you would normally confirm the results of the initializer here
assert.ok(true);
});