Closed Mikek2252 closed 8 months ago
All of my tests are now failing because of this change.
We have an instance-initializer that uses ember-local-storage and tries to update it and now it fails on every test saying something along the lines "..tried to set the property of a destroyed object" meaning the ember-local-storage is now destroyed when my instance-initializer tries to use it.
@Pixelik oh no! Can you share the initializer?
I will try to find some time and provide you with the code - for now I've downgraded it's ok 🙏
Resolves #376 This is to ensure that storage objects are destroyed when the app is torn down in tests, currently objects created by
storageFor
are not destroyed after the test is torn down, i think this is because the class is returned by a computed property so is not destroyed by the parent that callsstorageFor
Storage instances of adapters are destroyed but i have added owner injection to ensure that
associateDestroyableChild
does not error with a missing owner.to ensure backward compatibility i have also added the destroyable polyfill