Closed danny0838 closed 1 month ago
assert.throw(async () => { // expect this to throw await somefunc(/* args */); });
Something like the above code doesn't work as expected.
Is there a way to assert whether a promise should throw?
Currently I think you would need to use something like chai-as-promised. We really need to pull that capability into core I think, given how fundamental it is these days
Something like the above code doesn't work as expected.
Is there a way to assert whether a promise should throw?