mirror of
https://github.com/denoland/deno.git
synced 2025-08-02 18:12:39 +00:00
feat(cli/js/testing): Add TestDefinition::skip (#4351)
This commit is contained in:
parent
a159165fe5
commit
64a35acd64
6 changed files with 104 additions and 105 deletions
13
cli/js/lib.deno.ns.d.ts
vendored
13
cli/js/lib.deno.ns.d.ts
vendored
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue