rescript-jest
rescript-jest copied to clipboard
Support `resolves` or `rejects` (assertions for promises)
Jest seems to have good support for promises with assertions: https://jestjs.io/docs/en/asynchronous#promises, which may be useful to provide.
There's already testPromise
. Do you think that's not sufficient?
@glennsl it doesn't seem as nice / aligned syntactically but functionally sufficient for sure!
I'm not really a fan of offering multiple ways of doing something, but since it's a pattern in jest, and as long as it's feasible, I'm not opposed to it. And at least API-wise it seems like it should line up well with the bs-jest
approach of requiring a single assertion to be returned.