diff options
author | Nayeem Rahman <nayeemrmn99@gmail.com> | 2020-06-12 16:58:04 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-12 11:58:04 -0400 |
commit | e613bfe47a3ebec076c82d038738904114ff2a7c (patch) | |
tree | c9deee488fc8dd3bf7fdcdd65be1f8677307a1d0 /cli/tests/unit/unit_test_runner.ts | |
parent | 3eee9614732ed8636bb8ebbd6f6a13d44531df6c (diff) |
feat: Add TestDefinition::only (#5793)
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 |