feat(cli/js/testing): Add TestDefinition::skip (#4351)

This commit is contained in:
Nayeem Rahman 2020-03-15 09:34:24 +00:00 committed by GitHub
parent a159165fe5
commit 64a35acd64
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 104 additions and 105 deletions

View file

@ -17,6 +17,7 @@ declare namespace Deno {
export interface TestDefinition {
fn: TestFunction;
name: string;
skip?: boolean;
}
/** Register a test which will be run when `deno test` is used on the command
@ -32,12 +33,16 @@ declare namespace Deno {
* when `Deno.runTests` is used */
export function test(name: string, fn: TestFunction): void;
enum TestStatus {
Passed = "passed",
Failed = "failed",
Skipped = "skipped"
}
interface TestResult {
passed: boolean;
name: string;
skipped: boolean;
hasRun: boolean;
duration: number;
status: TestStatus;
duration?: number;
error?: Error;
}