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
Deprecate setContext #448
Deprecate setContext #448
Conversation
9636abd
to
68039e9
Compare
} | ||
|
||
if (!contextName) { | ||
throw new Error('Can not detect test type. Please make sure you use the latest version of "@ember/test-helpers".'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needs coverage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unfortunatelly, in added test, there are some require.unsee
conflicts with https://github.com/san650/ember-cli-page-object/blob/master/tests/unit/-private/compatibility-test.js, which I could not figure out.
Removing a new test :(
to avoid setContext deprecation
68039e9
to
0c4e942
Compare
since we can recognize if it's moduleForComponent using @ember/test-helpers API It also changes priority of execution_contexts, so RFC268 mode becomes a default one, if supported.
ba8c125
to
9df3b28
Compare
Fixes #444
moduleForComponent
+setContext
was a point of much confusion for ages. With @ember/test-helpers we are able to auto-detect if it'smoduleForComponent
kind of test or not.