Thomas Cruveilher

Results 24 comments of Thomas Cruveilher

I was working on it, but I got the following problem : With the change, how do we assert async functions that throw instead of returning a rejecting `Promise`? I...

It sadly doesn't work as-is. `assertThrows` cannot take async functions/Promise as parameters. ```ts Deno.test("testingAssertRejectsWithThrowFailAsItExpectARejection", async () => { assertThrows(assertRejects(() => { throw new Error(); })); }); ``` Gives the following...

@dsherret That is my point. You can use `assertThrows` with `syncThrow` but not with `asyncThrow`. We cannot ask people to rewrite their `async function` to be used with `assertThrows` as...

> Async functions capture thrown errors and turn them into promise rejections. If the function wasn't actually async and just returns a promise normally and it were to throw instead,...

> I think I'm not understanding what you mean. People would continue using `assertRejects` for async functions after this change to my understanding. My bad, I might not be as...

Okay my bad, I totally missed the point of synchronicity, which was the subject of this issue, and went in an insanely wrong direction. Doesn't feel good to be dumb...

Adding another example (in case it can be useful): https://deno.land/x/[email protected]/mod.ts

@yacinehmito Any way I could help tackling this issue ? It's a really blocking issue, I am ready to try to work on it despite my limited rust knowledge. If...

Guess I need to find which dependency uses node and get rid of it then. I don't want to use them either.

Adding another example (in case it can be useful): https://deno.land/x/[email protected]/mod.ts