mercredi 6 janvier 2021

Ember add-on random tests fail with "Can not call `.lookup` after the owner has been destroyed” after updating ember and dependencies

I updated my add-on’s dependencies, and ember version to use octane (following ember guide). The add-on works correctly as it did before, but not the tests. A single random test (not always the same test) fails, and if I re-run the single test by itself, it passes. The random test failure error is always the same: Can not call `.lookup` after the owner has been destroyed.

I’ve also tried running test related code-mods, but that resulted in more errors, in addition to the aforementioned random test error, so I reverted the code-mods. (I plan on updating tests to use the latest style but would rather do that in a separate effort, if possible). I'd greatly appreciate any info on why this error occurs, or how I can get rid of it.

If it helps, I originally had these as part of my dependencies (before updating):

"ember-cli": "~3.0.4",
"ember-source": "~3.0.0",
"ember-cli-pretender": "1.0.1",
"ember-cli-qunit": "^4.3.2",
"ember-native-dom-helpers": "^0.6.2",
"ember-qunit-assert-helpers": "0.2.1",
"ember-qunit-nice-errors": "^1.2.0",
"ember-qunit-source-map": "^1.2.0",
"ember-sinon": "^2.1.0",
"ember-sinon-qunit": "^3.1.0",
"ember-test-selectors": "^0.3.9”,

I now have these as part of my dependencies (after my update):

"ember-cli": "~3.23.0",
"ember-source": "~3.23.1",
"ember-cli-pretender": "4.0.0",
"ember-native-dom-helpers": "^0.6.3",
"ember-qunit": "^4.6.0",
"ember-qunit-assert-helpers": "0.2.2",
"ember-qunit-nice-errors": "^1.2.0",
"ember-qunit-source-map": "^1.2.0",
"ember-sinon": "^5.0.0",
"ember-sinon-qunit": "^5.0.0",
"ember-test-selectors": "^5.0.0",
"qunit-dom": "^1.6.0”,

Thank you very much!!




Aucun commentaire:

Enregistrer un commentaire