-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests failing after upgrading to 1.0.0-beta16 #2924
Comments
hmm. I wonder if this line is causing the issue https://github.com/emberjs/data/blob/master/packages/ember-data/lib/system/store.js#L1929. It should only get run when the store is being destroyed. Could your tests be holding on to and old store? |
After playing around in the debugger, it seems like you might be right—despite Is the problem with ember-test-helpers? (I should have noted I'm using Ember-CLI 0.2.0 for running my tests). |
It could be related ember-test-helpers. I know the |
I'm seeing a different error
But it seems to also be related to the subject() test helper. I worked around it by creating the model using createRecord when I needed it instead of calling this.subject() |
ping @rwjblue |
That's the same issue I'm experiencing @jrjohnson, I just tracked down the exact line throwing the exception. |
@pmdarrow Do you mind sharing what line was throwing the exception? |
Should be fixed once emberjs/ember-test-helpers#28 is merged and released in a new ember-qunit version. |
@bmac the line I linked in my first post is where the exception is being thrown. Looks like it's been fixed elsewhere so you can probably close this. |
ember-qunit@0.3.0 is release fixing this... |
`ember-qunit@0.3.0` contains fix for emberjs/data#2924, which resolves issues with `this.subject()`
I'm seeing this same error trying to upgrade ghost to 1.11 (TryGhost/Ghost#5094), but we're on mocha rather than qunit. Can anyone point me towards a solution for that? |
Sounds like the same issue. @dgeb which version of ember-mocha uses |
@novaugust - Update to 0.6.0 of ember-mocha in your |
Thanks gents, fixed now |
I'm still facing this bug using the latest and greatest versions of everything:
On the |
I've found the change in my code that triggered this: I changed the cleaning of the state of a This works: actions: {
willTransition() {
const spellingTest = this.modelFor(this.routeName);
spellingTest.get('trays').filterBy('isNew').forEach(function (tray) {
if (tray.get('isNew')) {
tray.get('tasks').filterBy('isNew').forEach(t => t.destroyRecord());
tray.destroyRecord();
}
});
return true;
},
// ...
} This fails: deactivate() {
const spellingTest = this.modelFor(this.routeName);
spellingTest.get('trays').filterBy('isNew').forEach(function (tray) {
if (tray.get('isNew')) {
tray.get('tasks').filterBy('isNew').forEach(t => t.destroyRecord());
tray.destroyRecord();
}
});
} Then I realized that I don't need to call deactivate() {
const spellingTest = this.modelFor(this.routeName);
spellingTest.get('trays').filterBy('isNew').forEach(function (tray) {
if (tray.get('isNew')) {
tray.get('tasks').filterBy('isNew').forEach(t => t.deleteRecord());
tray.deleteRecord();
}
});
} I'd say that for some reason the |
Seeing same issues with ember-qunit 0.3.9 |
After upgrading to 1.0.0-beta16, all of my models tests are failing on this line: 31583db#diff-1636bea36bbe333a834ea11fbfbde48dR1876. It appears
this._containerCache
is undefined and thereforethis._containerCache[key]
throws an exception. Each model test seems to pass fine when run in isolation, but when I test an entire module or run the whole suite, I get exception errors for each test.The text was updated successfully, but these errors were encountered: