I have a very basic Ember-CLI application running with about 75 or so QUnit assertions that all pass. When I generate an acceptance test:
ember generate acceptance-test games
Which produces:
import Ember from 'ember';
import { module, test } from 'qunit';
import startApp from '../helpers/start-app';
var application;
module('Acceptance: Games', {
beforeEach: function() {
application = startApp();
},
afterEach: function() {
Ember.run(application, 'destroy');
}
});
test('visiting /games', function(assert) {
visit('/games');
andThen(function() {
assert.equal(currentPath(), 'games');
});
});
My tests then begin break on a JSHint unit test for the route:
52. JSHint - unit/routes/games: global failure (1, 0, 1)
1. Uncaught Error: Assertion Failed: calling set on destroyed object
Source: http://localhost:4200/assets/vendor.js:14407
I'm just starting with these Ember-CLI Integration tests, so perhaps there's something I'm missing? The error seems like that maybe I'm setting up something but not tearing it down properly somewhere else? Even if that's the case, I'm not sure why adding one acceptance test would produce this while without the test everything passes.
The console also shows:
WARNING: Library "App" is already registered with Ember.
ember.debug.js:3940 Uncaught Error: Assertion Failed: calling set on destroyed object
For reference, I'm on:
DEBUG: Ember : 1.10.0
DEBUG: Ember Data : 1.0.0-beta.15
DEBUG: jQuery : 1.11.2
Thanks in advance,
Update:
When removing the generated code from the acceptance test and replacing with something like:
assert.ok(true);
All of the tests pass. As soon as I add something like:
visit('/games');
I then start seeing the "calling set on a destroyed object" error seemingly randomly on various unit tests.