summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorhlaaftana <10591326+hlaaftana@users.noreply.github.com>2020-04-30 19:04:53 +0300
committerGitHub <noreply@github.com>2020-04-30 17:04:53 +0100
commit0aefebb728622dfda05db68e2d04ba7c47405444 (patch)
treec493a4b022a96ae2516d65ca83d9fed3833ab82c /tests
parent4d799f88200aaaf35d9275b64d2c23611b943769 (diff)
downloadNim-0aefebb728622dfda05db68e2d04ba7c47405444.tar.gz
JS unittest stacktrace fix, cleanup js repr and inclrtl includes (#14168)
Diffstat (limited to 'tests')
-rw-r--r--tests/js/tunittest_error.nim22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/js/tunittest_error.nim b/tests/js/tunittest_error.nim
new file mode 100644
index 000000000..ab736bf59
--- /dev/null
+++ b/tests/js/tunittest_error.nim
@@ -0,0 +1,22 @@
+discard """
+  exitcode: 1
+  outputsub: "[FAILED] with exception"
+"""
+
+import unittest
+
+proc ddd() =
+  raise newException(IOError, "didn't do stuff")
+
+proc ccc() =
+  ddd()
+
+proc bbb() =
+  ccc()
+
+proc aaa() =
+  bbb()
+
+test "with exception":
+  check 3 == 3
+  aaa()