Open BryanCrotaz opened 7 years ago
@BryanCrotaz thanks for reporting. Is the addon public?
No, but you should be able to reproduce by creating a service in an addon and having the service use storageFor and get it in init
Did you define the storage object in app/storages
or addon/storages
?
used your generator which puts it in app
Will dig into it.
How do you test it? I mean do you use it in the dummy app or use the addon in a normal app? Would be great if you could provide a repo to reproduce the error.
@BryanCrotaz any news?
Any news on this? I'd like to know how to make the tests work.
@tinyweasel can you provide a repo to reproduce?
@BryanCrotaz @tinyweasel If one of you can provide a repo to reproduce I'm happy to fix it.
Hi, any updates with this issue?
@carlos-figueroa-globant I still can not reproduce it. If you have a repo I can test with I'll take a look.
For anyone who may be struggling with this: We discovered that adding the storage key to the needs
array in your test seems to solve the problem.
In the route/controller:
myModel: storageFor('my-model')
In the test:
needs: [
'storage:my-model'
]
@ammorrise Thank you for that hint!
Using storageFor in addon fails at test time with error TypeError: Unknown StorageFactory: storage:
at createStorage