@francesconovy wrote:
After updating to Ember 3.9, we now get a bunch of these deprecation warnings: https://deprecations.emberjs.com/v3.x/#toc_computed-property-override
For places in our application where we use this, the steps to “fix” the deprecation make sense and we’ll gladly follow them.
However, there are some instances where we override a
computed()
property in a unit test, e.g. to mock certain things. These places now also trigger this deprecation. For example:myProperty: computed(function() { // do some complex stuff that depends on a bunch of other properties... return myProperty; })
In the test:
let component = this.owner.factoryFor('component:my-component').create({ myProperty: mockedProperty });
It doesn’t feel nice to add a setter and an internal private property etc. just so this can be mocked in a test… Are there any other patterns or ideas on how to tackle this in a nice, non-deprecation-triggering way?
Posts: 1
Participants: 1