diff options
Diffstat (limited to 'tests/specs/run/_012_async/012_async.ts')
-rw-r--r-- | tests/specs/run/_012_async/012_async.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/specs/run/_012_async/012_async.ts b/tests/specs/run/_012_async/012_async.ts new file mode 100644 index 000000000..536197b68 --- /dev/null +++ b/tests/specs/run/_012_async/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(); |