File size: 325 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
// regression test for async/await
// code inspired by https://github.com/formium/tsdx/issues/869
let shouldBeTrue = false;
(async () => {
  shouldBeTrue = true; // a side effect to make sure this is output
  await Promise.resolve();
})();

export async function testAsync() {
  return await Promise.resolve(shouldBeTrue);
}