diff options
Diffstat (limited to 'cli/tests/testdata/012_async.ts')
| -rw-r--r-- | cli/tests/testdata/012_async.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cli/tests/testdata/012_async.ts b/cli/tests/testdata/012_async.ts new file mode 100644 index 000000000..536197b68 --- /dev/null +++ b/cli/tests/testdata/012_async.ts @@ -0,0 +1,11 @@ +// Check that we can use the async keyword. +async function main() { + await new Promise((resolve) => { + console.log("2"); + setTimeout(resolve, 100); + }); + console.log("3"); +} + +console.log("1"); +main(); |
