MCPcopy Index your code
hub / github.com/kirodotdev/Kiro / testClassification

Function testClassification

scripts/test/test-local.ts:34–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

32];
33
34async function testClassification() {
35 console.log("\n=== Testing Issue Classification ===\n");
36
37 const taxonomy = new LabelTaxonomy();
38
39 for (const issue of TEST_ISSUES) {
40 console.log(`\nIssue: "${issue.title}"`);
41 console.log(`Body: ${issue.body.substring(0, 80)}...`);
42
43 try {
44 const result = await classifyIssue(issue.title, issue.body, taxonomy);
45
46 if (result.error) {
47 console.error(`❌ Error: ${result.error}`);
48 } else {
49 console.log(`✅ Recommended labels: ${result.recommended_labels.join(", ")}`);
50 console.log(` Reasoning: ${result.reasoning}`);
51
52 // Validate labels
53 const validLabels = validateLabels(result.recommended_labels, taxonomy);
54 console.log(` Valid labels: ${validLabels.join(", ")}`);
55 }
56 } catch (error) {
57 console.error(`❌ Classification failed: ${error}`);
58 }
59 }
60}
61
62async function testDuplicateDetection() {
63 console.log("\n\n=== Testing Duplicate Detection ===\n");

Callers 1

mainFunction · 0.85

Calls 2

classifyIssueFunction · 0.85
validateLabelsFunction · 0.85

Tested by

no test coverage detected