MCPcopy
hub / github.com/codeceptjs/CodeceptJS / clusterize

Function clusterize

lib/plugin/analyze.js:312–323  ·  view source on GitHub ↗
(failedTestsAndErrors)

Source from the content-addressed store, hash-verified

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()

Callers 1

printReportFunction · 0.85

Calls 4

formatResponseFunction · 0.85
createCompletionMethod · 0.80
stopMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected