diff options
author | Yongwook Choi <hyperflow@kakao.com> | 2022-04-06 23:51:38 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-06 16:51:38 +0200 |
commit | 0df18542499d1220f1182496d3b7028eef243eb0 (patch) | |
tree | dbfb2fb6490371c45eadd9eabe0a8e81ea304fa1 /cli/dts/lib.deno.ns.d.ts | |
parent | e33329b47ea1586bd1fbc686cae3048a080039ca (diff) |
feat(test): Add "name", "origin" and "parent" to "Deno.TestContext" (#14007)
This commit adds following fields to "Deno.TestContext" interface:
- name
- origin
- parent
These are prerequisites for supporting snapshot functionality in
"std/testing".
Diffstat (limited to 'cli/dts/lib.deno.ns.d.ts')
-rw-r--r-- | cli/dts/lib.deno.ns.d.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cli/dts/lib.deno.ns.d.ts b/cli/dts/lib.deno.ns.d.ts index d55ac231e..485b3d490 100644 --- a/cli/dts/lib.deno.ns.d.ts +++ b/cli/dts/lib.deno.ns.d.ts @@ -250,6 +250,19 @@ declare namespace Deno { } export interface TestContext { + /** + * The current test name. + */ + name: string; + /** + * File Uri of the current test code. + */ + origin: string; + /** + * Parent test context. + */ + parent?: TestContext; + /** Run a sub step of the parent test or step. Returns a promise * that resolves to a boolean signifying if the step completed successfully. * The returned promise never rejects unless the arguments are invalid. @@ -270,6 +283,9 @@ declare namespace Deno { export interface TestStepDefinition { fn: (t: TestContext) => void | Promise<void>; + /** + * The current test name. + */ name: string; ignore?: boolean; /** Check that the number of async completed ops after the test step is the same @@ -287,6 +303,9 @@ declare namespace Deno { export interface TestDefinition { fn: (t: TestContext) => void | Promise<void>; + /** + * The current test name. + */ name: string; ignore?: boolean; /** If at least one test has `only` set to true, only run tests that have |