LogoRobo.js
Packages@robojs/mock

createTestSession()

Function: createTestSession()

function createTestSession(testFilePath, config): Promise<TestSession>

Create a test session with automatic registry tracking

When running via robo mock test, this returns the shared session that the bot is connected to. Otherwise, it creates a new session.

Parameters

ParameterTypeDescription
testFilePathstringPath to the test file (use __filename)
configCreateTestSessionConfigSession configuration

Returns

Promise<TestSession>

On this page