Stabzs / Angular2-Toaster

Angular2-toaster is an asynchronous, non-blocking Angular Toaster Notification library
MIT License
334 stars 93 forks source link

Unit testing #187

Closed zinkalthakker closed 4 years ago

zinkalthakker commented 5 years ago

How to pass unit-test with this plugin? I am getting an error "No Toaster Containers have been initialized to receive toasts." Then I created spy of the service and now i am confused which mock data I have to pass as an object.

Stabzs commented 4 years ago

The check for receiving containers occurs in ToasterService. If you mock the service, you should never run against the check.