(failedTestAndError)
| 323 | } |
| 324 | |
| 325 | async function analyze(failedTestAndError) { |
| 326 | const spinner = ora('Analyzing failure...').start() |
| 327 | const prompt = config.prompts.analyze(failedTestAndError, config) |
| 328 | try { |
| 329 | const response = await ai.createCompletion(prompt) |
| 330 | spinner.stop() |
| 331 | return formatResponse(response) |
| 332 | } catch (err) { |
| 333 | spinner.stop() |
| 334 | console.error('Error analyzing failure:', err.message) |
| 335 | } |
| 336 | } |
| 337 | } |
| 338 | |
| 339 | function serializeError(error) { |
no test coverage detected