mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
* rename proposal-explicit-resource-management to transform-explicit-resource-management * update library description * bump Babel/core version requirements to ^7.23.9 * add deprecation reminder * remove outdated reminders * update reminder date
23 lines
392 B
JavaScript
23 lines
392 B
JavaScript
return (async function () {
|
|
let disposed = false;
|
|
let beforeEnd;
|
|
|
|
const err1 = {};
|
|
const err2 = {};
|
|
let thrown;
|
|
|
|
try {
|
|
await using x = {
|
|
[Symbol.asyncDispose || Symbol.for("Symbol.asyncDispose")]() {
|
|
throw err1;
|
|
},
|
|
};
|
|
throw err2;
|
|
} catch (e) {
|
|
thrown = e;
|
|
}
|
|
|
|
expect(thrown.suppressed).toBe(err2);
|
|
expect(thrown.error).toBe(err1);
|
|
})();
|