summary refs log tree commit diff stats
path: root/tests/js/tasync.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/tasync.nim')
-rw-r--r--tests/js/tasync.nim33
1 files changed, 0 insertions, 33 deletions
diff --git a/tests/js/tasync.nim b/tests/js/tasync.nim
deleted file mode 100644
index 318237651..000000000
--- a/tests/js/tasync.nim
+++ /dev/null
@@ -1,33 +0,0 @@
-discard """
-  output: '''
-x
-e
-'''
-"""
-
-import asyncjs
-
-# demonstrate forward definition
-# for js
-proc y(e: int): Future[string] {.async.}
-
-proc e: int {.discardable.} =
-  echo "e"
-  return 2
-
-proc x(e: int): Future[void] {.async.} =
-  var s = await y(e)
-  if e > 2:
-    return
-  echo s
-  e()
-
-proc y(e: int): Future[string] {.async.} =
-  if e > 0:
-    return await y(0)
-  else:
-    return "x"
-
-
-discard x(2)
-