Debian Codegraph @

packages/babel-plugin-proposal-async-do-expressions/test/fixtures/async-do-expressions/throw-statement/exec.js

raw
1 const x = async do { throw new Error("sync") };
2
3 expect(x).toBeInstanceOf(Promise);
4 x.then(() => { throw new Error("expected an error: sync is thrown.") })
5 .catch(err => { expect(err.message).toEqual("sync") });