diff options
Diffstat (limited to 'cli/tests/unit/unit_test_runner.ts')
-rwxr-xr-x | cli/tests/unit/unit_test_runner.ts | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/cli/tests/unit/unit_test_runner.ts b/cli/tests/unit/unit_test_runner.ts index e3df358d7..38db545c7 100755 --- a/cli/tests/unit/unit_test_runner.ts +++ b/cli/tests/unit/unit_test_runner.ts @@ -2,6 +2,8 @@ // Copyright 2018-2020 the Deno authors. All rights reserved. MIT license. import "./unit_tests.ts"; import { + REGISTERED_UNIT_TESTS, + colors, readLines, permissionCombinations, Permissions, @@ -225,6 +227,13 @@ async function masterRunnerMain( } console.log("Unit tests passed"); + + if (REGISTERED_UNIT_TESTS.find(({ only }) => only)) { + console.error( + `\n${colors.red("FAILED")} because the "only" option was used` + ); + Deno.exit(1); + } } const HELP = `Unit test runner |