(failedTestsAndErrors)
| 310 | } |
| 311 | |
| 312 | async function clusterize(failedTestsAndErrors) { |
| 313 | const spinner = ora('Clusterizing failures...').start() |
| 314 | const prompt = config.prompts.clusterize(failedTestsAndErrors, config) |
| 315 | try { |
| 316 | const response = await ai.createCompletion(prompt) |
| 317 | spinner.stop() |
| 318 | return formatResponse(response) |
| 319 | } catch (err) { |
| 320 | spinner.stop() |
| 321 | console.error('Error clusterizing failures', err.message) |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | async function analyze(failedTestAndError) { |
| 326 | const spinner = ora('Analyzing failure...').start() |
no test coverage detected