lundi 6 mai 2019

How to mock and spy on namespace in test suite?

I'm trying to write tests for an Angular component that uses namespace. It compiles correctly, however I'm not quite sure how to mock or spy on namespace that's being used.

I've tried defining it in testing module providers, but that obviously won't work, since it's not being injected. Is there any other way to provide mock of namespace for unit test?

example stackblitz: https://stackblitz.com/edit/angular-testing-tyazbd

Aucun commentaire:

Enregistrer un commentaire