export async function worker({ config, globalConfig, path, serializableModuleMap, context, }: WorkerData): Promise<TestResult> { try { const moduleMap = serializableModuleMap ? HasteMap.ModuleMap.fromJSON(serializableModuleMap) : null; return await runTest( path, globalConfig, config, getResolver(config, moduleMap), context && { ...context, changedFiles: context.changedFiles && new Set(context.changedFiles), }, ); } catch (error) { throw formatError(error); } }
export async function worker({ config, globalConfig, path, context, }: WorkerData): Promise<TestResult> { try { return await runTest( path, globalConfig, config, getResolver(config), context && { ...context, changedFiles: context.changedFiles && new Set(context.changedFiles), }, ); } catch (error) { throw formatError(error); } }