summaryrefslogtreecommitdiff
path: root/tools/unit_tests.py
diff options
context:
space:
mode:
authorKitson Kelly <me@kitsonkelly.com>2018-10-12 08:23:22 +1100
committerRyan Dahl <ry@tinyclouds.org>2018-10-11 20:29:43 -0400
commit298d75515268315f8c24769555b604c534e15925 (patch)
tree27cbcd9d75438f042f10d8b1b78be3f05b2ae06f /tools/unit_tests.py
parentec402c6932128d215f78c77661d84472a89b72b1 (diff)
Add support for --types
Diffstat (limited to 'tools/unit_tests.py')
-rwxr-xr-xtools/unit_tests.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/tools/unit_tests.py b/tools/unit_tests.py
index b9be48436..14f1d18b7 100755
--- a/tools/unit_tests.py
+++ b/tools/unit_tests.py
@@ -4,9 +4,7 @@ import sys
import subprocess
import re
-
-def run_unit_test(deno_exe, permStr, flags=[]):
- cmd = [deno_exe, "--reload", "js/unit_tests.ts", permStr] + flags
+def run_unit_test2(cmd):
process = subprocess.Popen(
cmd,
bufsize=1,
@@ -28,6 +26,10 @@ def run_unit_test(deno_exe, permStr, flags=[]):
if errcode != 0:
sys.exit(errcode)
+def run_unit_test(deno_exe, permStr, flags=[]):
+ cmd = [deno_exe, "--reload", "js/unit_tests.ts", permStr] + flags
+ run_unit_test2(cmd)
+
# We want to test many ops in deno which have different behavior depending on
# the permissions set. These tests can specify which permissions they expect,
@@ -43,6 +45,16 @@ def unit_tests(deno_exe):
# TODO We might accidentally miss some. We should be smarter about which we
# run. Maybe we can use the "filtered out" number to check this.
+ # These are not strictly unit tests for Deno, but for ts_library_builder.
+ # They run under Node, but use the same //js/testing/ library.
+ run_unit_test2([
+ "node",
+ "./node_modules/.bin/ts-node",
+ "--project",
+ "tools/ts_library_builder/tsconfig.json",
+ "tools/ts_library_builder/test.ts"
+ ])
+
if __name__ == '__main__':
if len(sys.argv) < 2: