I am an ember nube. I have retraced the steps in the Ember tutorial and taken a very gentle detour to add bootstrap with an authentication flow. Somewhere along the way I added the application route. The generator made this:
import { moduleFor, test } from 'ember-qunit';
moduleFor('route:application', 'Unit | Route | application', {
// Specify the other units that are required for this test.
// needs: ['controller:foo']
});
test('it exists', function(assert) {
let route = this.subject();
assert.ok(route);
});
It is bombing. I have done some sleuthing, but I am too new to find the cause of my woe in the stack trace below. I could of course just blow off the error, but I have the feeling I am going to be doing the same blunder again, and would like to not weaken the test cases. Does anyone know what I am missing in my application-test.js?
Unit | Route | application: it exists (1, 0, 1)Rerun39 ms
Died on test #1 at testWrapper (http://localhost:7357/assets/test-support.js:7162:11)
at test (http://localhost:7357/assets/test-support.js:7176:39)
at Module.callback (http://localhost:7357/assets/tests.js:367:24)
at Module.exports (http://localhost:7357/assets/vendor.js:132:32)
at requireModule (http://localhost:7357/assets/vendor.js:32:18)
at Object.TestLoader.require (http://localhost:7357/assets/test-support.js:6942:7)
at Object.loadModules (http://localhost:7357/assets/test-support.js:6934:14): Cannot read property 'on' of undefined@ 22 ms
Source:
TypeError: Cannot read property 'on' of undefined
at http://localhost:7357/assets/vendor.js:151286:29
at Array.forEach (native)
at Class._subscribeToSessionEvents (http://localhost:7357/assets/vendor.js:151280:131)
at Class.init (http://localhost:7357/assets/vendor.js:151273:12)
at Class.superWrapper [as init] (http://localhost:7357/assets/vendor.js:35502:22)
at new Class (http://localhost:7357/assets/vendor.js:48214:14)
at Function.create (http://localhost:7357/assets/vendor.js:48485:14)
at Object.defaultSubject (http://localhost:7357/assets/test-support.js:8362:22)
at Object.context.(anonymous function) [as subject] (http://localhost:7357/assets/test-support.js:8394:37)
at Object.<anonymous> (http://localhost:7357/assets/tests.js:368:22)
Source: at testWrapper (http://localhost:7357/assets/test-support.js:7162:11) at test (http://localhost:7357/assets/test-support.js:7176:39) at Module.callback (http://localhost:7357/assets/tests.js:367:24) at Module.exports (http://localhost:7357/assets/vendor.js:132:32) at requireModule (http://localhost:7357/assets/vendor.js:32:18) at Object.TestLoader.require (http://localhost:7357/assets/test-support.js:6942:7) at Object.loadModules (http://localhost:7357/assets/test-support.js:6934:14)
Aucun commentaire:
Enregistrer un commentaire