diff --git a/libraries/tools/kotlin-test-js-runner/karma-debug-framework.js b/libraries/tools/kotlin-test-js-runner/karma-debug-framework.js index fa1ef977553..771eae5ea90 100644 --- a/libraries/tools/kotlin-test-js-runner/karma-debug-framework.js +++ b/libraries/tools/kotlin-test-js-runner/karma-debug-framework.js @@ -18,7 +18,7 @@ function configureTimeouts(injector) { webServer.timeout = 0 } const socketServer = injector.get('socketServer'); - if (socketServer) { + if (socketServer && typeof socketServer.set === 'function') { // Disable socket.io heartbeat (ping) to avoid browser disconnecting when debugging tests, // because no ping requests are sent when test execution is suspended on a breakpoint. // Default values are not enough for suspended execution: diff --git a/libraries/tools/kotlin-test-js-runner/src/DebugConfigurator.js b/libraries/tools/kotlin-test-js-runner/src/DebugConfigurator.js index f957ecf8a07..b2fd88eef42 100644 --- a/libraries/tools/kotlin-test-js-runner/src/DebugConfigurator.js +++ b/libraries/tools/kotlin-test-js-runner/src/DebugConfigurator.js @@ -97,4 +97,5 @@ export function fixMochaTimeout(config) { export function fixBrowserActivityTimeout(config) { config.browserNoActivityTimeout = null + config.pingTimeout = 24 * 60 * 60 * 1000 } \ No newline at end of file