1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-28 16:20:57 -05:00
denoland-deno/tools/unit_tests.py

29 lines
778 B
Python
Raw Normal View History

#!/usr/bin/env python
2019-01-21 14:03:30 -05:00
# Copyright 2018-2019 the Deno authors. All rights reserved. MIT license.
import sys
import subprocess
import http_server
from test_util import DenoTestCase, run_tests
2018-10-15 16:46:42 -04:00
class JsUnitTests(DenoTestCase):
def test_unit_test_runner(self):
cmd = [
self.deno_exe, "run", "--reload", "--allow-run",
"js/unit_test_runner.ts"
]
process = subprocess.Popen(
cmd, bufsize=1, universal_newlines=True, stderr=subprocess.STDOUT)
process.wait()
errcode = process.returncode
if errcode != 0:
raise AssertionError(
"js/unit_test_runner.ts exited with exit code %s" % errcode)
2018-10-15 16:46:42 -04:00
if __name__ == '__main__':
with http_server.spawn():
run_tests()