[explicit-resource-management] Add remaining tests specific to AsyncDisposableStack#4478
[explicit-resource-management] Add remaining tests specific to AsyncDisposableStack#4478
AsyncDisposableStack#4478Conversation
ec4ba19 to
22ca0e8
Compare
|
We've tried to divide this up between the folks present in the maintainers meeting, in order to land it:
|
ptomato
left a comment
There was a problem hiding this comment.
I reviewed adopt/, constructor.js, and toStringTag.js. One comment on constructor.js, but I may just be confused about that.
I'd also suggest adding a test that exercises the following:
const stack = new AsyncDisposableStack();
await stack.disposeAsync();
stack.adopt({}, async () => {});
// Should throw a ReferenceErrorI see this exists already for move() in move/throws-if-disposed.js, but could be added for adopt() and defer(), as well as for DisposableStack. If you want to do that in a separate PR I could review and merge that independently of this PR.
…r, fix internal slot reference in descriptions
Added here, hope that's not too much noise. If it is I can revert and pull that out to a separate PR. |
jugglinmike
left a comment
There was a problem hiding this comment.
Review for two more prototype methods, here
...yncDisposableStack/prototype/disposeAsync/does-not-reinvoke-disposers-if-already-disposed.js
Show resolved
Hide resolved
...built-ins/AsyncDisposableStack/prototype/disposeAsync/does-not-reject-if-already-disposed.js
Outdated
Show resolved
Hide resolved
...ck/prototype/disposeAsync/rejects-with-suppressederror-if-multiple-errors-during-disposal.js
Outdated
Show resolved
Hide resolved
...ck/prototype/disposeAsync/rejects-with-suppressederror-if-multiple-errors-during-disposal.js
Outdated
Show resolved
Hide resolved
test/built-ins/AsyncDisposableStack/prototype/disposeAsync/returns-promise.js
Outdated
Show resolved
Hide resolved
...built-ins/AsyncDisposableStack/prototype/disposeAsync/disposes-resources-in-reverse-order.js
Outdated
Show resolved
Hide resolved
|
I've suggested a few tests for the "Await(undefined)" in the DisposeResources algorithm: rbuckton#1 |
…c-awaits Add tests for explicit await
|
@gibson042, @ioannad any chance on final reviews this week? It's very possible I will be able to wrap up the ecma262 PR before plenary, which would leave this review as the final blocker to Stage 4. |
...osableStack/prototype/move/returns-new-asyncdisposablestack-that-contains-moved-resources.js
Outdated
Show resolved
Hide resolved
|
TLDR: For step 3 of Otherwise the tests seem to completely cover the spec steps for It would be nice to optionally also have some basic funcionality tests (these are also in staging for defer and for move). I was also going to suggest a couple of exception propagation tests, but I see these are covered in |
…-asyncdisposablestack-that-contains-moved-resources.js Co-authored-by: Ioanna M Dimitriou H <idimitriou@igalia.com>
|
Is there a process in place for moving tests out of staging in general? Is there a reason we don't move all of the resource management tests out of staging? |
In an effort to make review more manageable, this extracts the remaining tests specific to
AsyncDisposableStackfrom #3866