Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const _runInNode = async (testData: IPCTestData): Promise => {
try {
return runTest(
testData.path,
testData.globalConfig,
testData.config,
getResolver(testData.config, testData.serialisableModuleMap),
);
} catch (error) {
// eslint-disable-next-line no-console
console.error(error);
return buildFailureTestResult(
testData.path,
error,
testData.config,
testData.globalConfig,
);
}
};
async (event, testData: IPCTestData, workerID: string) => {
try {
const result = await runTest(
testData.path,
testData.globalConfig,
testData.config,
getResolver(testData.config, testData.serialisableModuleMap),
);
ipcRenderer.send(workerID, result);
} catch (error) {
ipcRenderer.send(
workerID,
buildFailureTestResult(
testData.path,
error,
testData.config,
testData.globalConfig,
),