There is a good library that provides syntax sugar for Promise validations via Jasmine jasmine-promise-matchers. It comes hard to test complex result objects, example proposes to use jasmine.objectContaining from jasmine-matchers,
but the easier way for the same is just to map promise into tested value and use toBeResolvedWith on a projection from pormise.
No comments:
Post a Comment