Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async runTest(testData: IPCTestData): Promise {
try {
const testConsole = setupConsole();
// $FlowFixMe
setupExpect(testData.globalConfig);
initialize({
config: testData.config,
globalConfig: testData.globalConfig,
localRequire: require,
parentProcess: process,
testPath: testData.path,
});
const {setupTestFrameworkScriptFile} = testData.config;
if (setupTestFrameworkScriptFile) {
require(setupTestFrameworkScriptFile);
}
require(testData.path);
const testResult = await runAndTransformResultsToJestFormat({
config: testData.config,
globalConfig: testData.globalConfig,