From 20dad3659c60b61c9f5af5427ad61857593bf3e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 5 Mar 2020 11:52:18 +0100 Subject: refactor: preliminary cleanup of Deno.runTests() (#4237) * refactor: preliminary cleanup of Deno.runTests() * Change time measurement to use new Date() instead of performance.now(). Because there is no guarantee that tests are run with "--allow-hr" using new Date() guarantees higher precision of 1ms instead of 2ms. * Support String type filter in "skip" and "only". * Split "exitOnFail" into "exitOnFail" and "failFast". Former tells if "runTests()" should exit with code 1 on test failure, while latter tells if "runTests()" should stop running tests on first failure. * Use "defer" to wait for unhandled promise rejection - this bit is funky and doesn't seem right, but for now it's just a rewrite from using "setTimeout". Intended to be fixed in later commits. * Remove global "__DENO_TEST_REGISTRY", don't expose list of registered tests (to be addressed in follow up commits) * Remove arbitrary slow test threshold; use uniform coloring instead --- cli/js/unit_tests.ts | 1 + 1 file changed, 1 insertion(+) (limited to 'cli/js/unit_tests.ts') diff --git a/cli/js/unit_tests.ts b/cli/js/unit_tests.ts index 5093ce0b2..2b02f8dcf 100644 --- a/cli/js/unit_tests.ts +++ b/cli/js/unit_tests.ts @@ -53,6 +53,7 @@ import "./symbols_test.ts"; import "./symlink_test.ts"; import "./text_encoding_test.ts"; import "./timers_test.ts"; +import "./testing_test.ts"; import "./tls_test.ts"; import "./truncate_test.ts"; import "./tty_test.ts"; -- cgit v1.2.3