referee icon indicating copy to clipboard operation
referee copied to clipboard

Feature: expand verify to ensure no async assertions are pending

Open mgred opened this issue 6 years ago • 4 comments

Extracted form the discussion of #47.

https://github.com/sinonjs/referee/issues/47#issuecomment-436646220

* If #45 lands, then expand `verify` to ensure all promises from `resolves` and `rejects` are resolved or rejected

The following example will pass, because we don't let the test runner handle the returned promise.

describe("some test", function() {
    it("should resolve", function() {
        referee.assert.resolves(Promise.resolve(42), 43);
    }):
});

This issue is an approach to verify if all async assertions have been properly resolved.

@mroderick, @mantoni

mgred avatar Nov 16 '18 16:11 mgred

Go for it!

mroderick avatar Nov 17 '18 09:11 mroderick

@mgred, if you are not looking into this, I can give it a try.

rpgeeganage avatar Jun 19 '19 08:06 rpgeeganage

@mgred, if you are not looking into this, I can give it a try.

I don't think they'll be too upset if your work overlaps ... and after six months, I think it's fair to take it up 👍

mroderick avatar Jun 19 '19 08:06 mroderick

@mroderick , Thanks. I will look into this.

rpgeeganage avatar Jun 19 '19 20:06 rpgeeganage