Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.catch(function(result) {
const errAdapter = new testcafe.embeddingUtils.TestRunErrorFormattableAdapter(result, {
testRunPhase: testController.testRun.phase,
userAgent: testController.testRun.browserConnection.browserInfo.userAgent,
});
return testController.testRun.errs.push(errAdapter);
});
};
const EventEmitter = require('events');
const testcafe = require('testcafe');
const TestRun = testcafe.embeddingUtils.TestRun;
const liveTestRunStorage = Symbol('live-test-run-storage');
const testRunCtorFactory = function (callbacks, command) {
const { created, started, done } = callbacks;
const { registerStopHandler } = command;
return class DebugRun extends TestRun {
constructor (test, browserConnection, screenshotCapturer, warningLog, opts) {
super(test, browserConnection, screenshotCapturer, warningLog, opts);
this[liveTestRunStorage] = { test, stopping: false, stop: false, isInRoleInitializing: false };
created(this, test);
this.injectable.scripts.push('/testcafe-live.js');