You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the macros in this addon all produce readonly CPs unless wrapped with writable(). For unit testing certain CPs it can make sense to overwrite the CP inputs/dependent keys with static values, but when using these macros we can't because the CPs are not writeable. It would be awesome to have some sort of toggle mechanism in testing mode that enables us to overwrite the CP with a static value.
The text was updated successfully, but these errors were encountered:
It seems to me that this should be a feature of Ember's read-only computed properties, then we can just piggy-back on them here. I don't think this is a problem unique to this library, and perhaps shouldn't be solved here.
Just brainstorming, but could you reopen the component class in a test helper, and do this.x = 'static val'; or defineProperty(this, 'x', 'static val');?
Currently the macros in this addon all produce readonly CPs unless wrapped with
writable()
. For unit testing certain CPs it can make sense to overwrite the CP inputs/dependent keys with static values, but when using these macros we can't because the CPs are not writeable. It would be awesome to have some sort of toggle mechanism in testing mode that enables us to overwrite the CP with a static value.The text was updated successfully, but these errors were encountered: