gemini-testing / testplane

Testplane (ex-hermione) browser test runner based on mocha and wdio
https://testplane.io
MIT License
710 stars 62 forks source link

feat: export TestFunctionCtx type #958

Closed KuznetsovRoman closed 3 months ago

KuznetsovRoman commented 3 months ago

After this PR, user would be able to use clean module augmentation. Example:

import type { TestFunctionCtx as TestplaneTestFunctionCtx } from "testplane";

declare module 'testplane' {
    export interface TestFunctionCtx extends TestplaneTestFunctionCtx {
        myFunc(var1: string, var2: number): Promise<void>;
    }
}

Also he would be able to pass test function context to other functions and type them properly: https://github.com/gemini-testing/testplane/discussions/939