Hermione 8.9.4 - как расширить тип TestFunctionCtx #939
|
На этапе инициализации гермионы плагинами и хуками в контекст тестовой функции добавляются некоторые поля - раньше тип можно было расширить через Как теперь это можно сделать для типа TestFunctionCtx? |
Answered by
KuznetsovRoman
Jun 26, 2024
Replies: 3 comments
|
Привет. Посмотрю сегодня. |
0 replies
|
В итоге очень просто (для hermione/8.9.5): Я пытался именно в hermione модуле аугментировать, но через него не получалось) |
0 replies
|
Starting with import type { TestFunctionCtx as TestplaneTestFunctionCtx } from "testplane";
declare module 'testplane' {
export interface TestFunctionCtx extends TestplaneTestFunctionCtx {
myFunc(var1: string, var2: number): Promise<void>;
}
}Also |
0 replies
Answer selected by
KuznetsovRoman
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Starting with
testplane@8.14.0, you can do this:Also
TestFunctionCtxis exported directly from "testplane" module.