I am testing an ember component that will do a call to an external method that returns a promise and calls the createObjectURL from the URL object of the navigator:
@fetch(@get 'self').then((blob) =>
url = URL.createObjectURL blob
@set 'url', url
)
However, test will always return:
TypeError: Failed to execute 'createObjectURL' on 'URL': No function was found that matched the signature provided.
I have tried to create a service and inject it, create an object and pass it to the @subject() method, but still. Is there any way to access the window.URL object of the chrome browser inside an ember test?
Aucun commentaire:
Enregistrer un commentaire