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