-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Inconsistent Mixin testing behavior #226
Comments
Is this in an application or addon? What Ember version is this being tested on? My only guess is that you are running tests on Ember 1.13 (where obj.actions is undefined) and on some 2.x version (where obj.actions is defined). This is obviously a giant WAG though, to really dig in I'll need a reproduction. |
I intended to list the version. It's 1.13.15. It's an application. Not sure how easy it will be to reproduce our environment, but I'll see if I can some up with a full application that exhibits the same behavior. |
I tried reproducing this in a clean environment but I can't do so. I'm at a loss as to what is happening. I guess we'll have to find a workaround. |
Depending on what you mix the thing into it will change the resulting location. In Ember 1.13, anything that normally has "actions" defined has that prop moved to _actions. |
It literally changes somewhat randomly between test reloads. In any case, adding
seems to fix the issue. |
Ya, if that is the case, there isn't much to be done here. This was a pretty weird thing that was done in Ember 1.x (and deprecated). Moving to Ember 2.0 should remove the inconsistency. Closing... |
We're trying to test a Mixin using the pattern generated by
ember g mixin
. But we're seeing inconsistent behavior.The test is easy:
this.PUBLIC_API
is defined in thebeforeEach
hook of themodule
call:Simple. All we're doing here is testing that the actions defined on the mixin are incorporated into the object into which it's being mixed in.
And yet when we run this via IrisUI we see two conflicting behaviors.
Sometimes
objToTest
in the test has itsactions
property defined; but other times it is undefined and the test fails referencing an undefined object. It seems to be there's some race condition here in how the objects are created, but it's got us somewhat stumped. Is this a known bug, or is there some other workaround?The text was updated successfully, but these errors were encountered: