summary refs log tree commit diff stats
path: root/testament
diff options
context:
space:
mode:
authorTimothee Cour <timothee.cour2@gmail.com>2021-02-24 12:03:21 -0800
committerGitHub <noreply@github.com>2021-02-24 21:03:21 +0100
commita4e6b242d56d80df004bf625643fcb3c9d3f1b7f (patch)
tree32298bbbeeae4aa4bfa5bed4a3305a744f7041ee /testament
parent99633d768236ea325c7c6482445ba71c62b30fb0 (diff)
downloadNim-a4e6b242d56d80df004bf625643fcb3c9d3f1b7f.tar.gz
asyncjs: add `then`, `catch` for promise pipelining (#16871)
* asyncjs: add then
* improve tests, changelog, API
* fix cryptic windows error: The parameter is incorrect
* address comments
Diffstat (limited to 'testament')
-rw-r--r--testament/testament.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/testament/testament.nim b/testament/testament.nim
index 8637f9464..1307c19ef 100644
--- a/testament/testament.nim
+++ b/testament/testament.nim
@@ -12,7 +12,7 @@
 import
   strutils, pegs, os, osproc, streams, json, std/exitprocs,
   backend, parseopt, specs, htmlgen, browsers, terminal,
-  algorithm, times, md5, sequtils, azure, intsets, macros
+  algorithm, times, md5, azure, intsets, macros
 from std/sugar import dup
 import compiler/nodejs
 import lib/stdtest/testutils
@@ -501,7 +501,8 @@ proc testSpecHelper(r: var TResults, test: var TTest, expected: TSpec,
           var args = test.args
           if isJsTarget:
             exeCmd = nodejs
-            args = concat(@[exeFile], args)
+            # see D20210217T215950
+            args = @["--unhandled-rejections=strict", exeFile] & args
           else:
             exeCmd = exeFile.dup(normalizeExe)
             if expected.useValgrind != disabled:
@@ -510,6 +511,7 @@ proc testSpecHelper(r: var TResults, test: var TTest, expected: TSpec,
                 valgrindOptions.add "--leak-check=yes"
               args = valgrindOptions & exeCmd & args
               exeCmd = "valgrind"
+          # xxx honor `testament --verbose` here
           var (_, buf, exitCode) = execCmdEx2(exeCmd, args, input = expected.input)
           # Treat all failure codes from nodejs as 1. Older versions of nodejs used
           # to return other codes, but for us it is sufficient to know that it's not 0.