# Variable TestHelper

TestHelper: {
connectToWS: ((jwt_token, ping_event?, ping_response_event?) => Promise<Socket<DefaultEventsMap, DefaultEventsMap>>);
createTestVars: ((cfg?) => ITestVars);
disableLogging: (() => void);
startServer: (() => Promise<ServerControlSet>);
strToJson: (<T>(str) => T);
swapCfgFile: ((cfgPath, content, revert?) => void);
}

#### Type declaration

- ##### connectToWS: ((jwt_token, ping_event?, ping_response_event?) => Promise<Socket<DefaultEventsMap, DefaultEventsMap>>)

  - - (jwt_token, ping_event?, ping_response_event?): Promise<Socket<DefaultEventsMap, DefaultEventsMap>>

    - #### Parameters

      - ##### jwt_token: string

      - ##### ping_event: string = '__PING__'

      - ##### ping_response_event: string = '__PONG__'

      #### Returns Promise<Socket<DefaultEventsMap, DefaultEventsMap>>

- ##### createTestVars: ((cfg?) => ITestVars)

  - - (cfg?): ITestVars

    - #### Parameters

      - ##### cfg: IAppConfig = null

      #### Returns ITestVars

- ##### disableLogging: (() => void)

  - - (): void

    - #### Returns void

- ##### startServer: (() => Promise<ServerControlSet>)

  - - (): Promise<ServerControlSet>

    - #### Returns Promise<ServerControlSet>

- ##### strToJson: (<T>(str) => T)

  - - <T>(str): T

    - #### Type Parameters

      - #### T extends Object

      #### Parameters

      - ##### str: string

      #### Returns T

- ##### swapCfgFile: ((cfgPath, content, revert?) => void)

  - - (cfgPath, content, revert?): void

    - #### Parameters

      - ##### cfgPath: string

      - ##### content: object

      - ##### revert: boolean = false

      #### Returns void

- Defined in src/tests/helpers/TestHelper.ts:207

Generated using TypeDoc