Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
717 views
in Technique[技术] by (71.8m points)

ember.js - 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”,

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...