I have a acceptance test that is failing to load an initializer during the beforeEach() application creation. Similar post here:“Attempting to register an unknown factory” in model test
tests/acceptance/home/index-test.js
import { test } from 'qunit';
import moduleForAcceptance from 'app_name/tests/helpers/module-for-acceptance';
moduleForAcceptance('Acceptance | home/index');
test('visiting /home/index', function(assert) {
visit('/home');
andThen(function() {
assert.equal(currentURL(), '/account/org');
});
});
initializers/pendo.js
export function initialize(application) {
window.pendo_options = {
apiKey: 'fake api key value',
usePendoAgentAPI: true
};
application.register('pendo:main', window.pendo, {
instantiate: false
});
application.inject('route:home', 'pendo', 'pendo:main');
application.inject('route:home/network', 'pendo', 'pendo:main');
}
export default {
name: 'pendo',
initialize: initialize
};
Aucun commentaire:
Enregistrer un commentaire