Huáng Jùnliàng 50e0e353ee Implement async-do-expressions transform (#13117)
Co-authored-by: Brian Ng <bng412@gmail.com>
2021-04-28 18:26:01 +02:00

5 lines
131 B
JavaScript

const x = async do { 21 + 21 };
expect(x).toBeInstanceOf(Promise);
x.then((v) => expect(v).toBe(42)).catch(err => { throw err });