mercredi 14 septembre 2016

ZoneAwarePromise has been overridden

After upgrading an application to rc-7 and running my unit tests to be sure nothing broke, I got this error message on about half of my unit tests.

"Error: Zone.js has detected that ZoneAwarePromise '(window|global).Promise' has been overwritten. Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js) in node_modules/zone.js/dist/zone.js (line 21)"

The closest I thing I can think of is that I mock responses from http calls in my unit tests by manually returning observables.

This is an Angular2 application using Jasmine and Karma for unit testing.

Aucun commentaire:

Enregistrer un commentaire