0

The way that zone.js works is by shimming out all standard browser/node APIs. That's a neat idea and seems to work quite well. It occurs to me that if its possible to provide your own custom shims then you could use that as a very flexible mocking system for tests rather than having to do stuff like rely on Sinon's fakeTimers.

Is doing this currently possible with zone?

George Mauer
  • 117,483
  • 131
  • 382
  • 612

1 Answers1

1

Yes, you can, and Sinon'sfakeTimers are being patched in a PR of zone.js (not released yet), but of course, you can create your own patch with current zone.js API.

jiali passion
  • 1,691
  • 1
  • 14
  • 19