@@ -28,19 +28,18 @@ describe("fixture regression suite", () => {
2828 createDefaultRegistry ( ) ,
2929 ) ;
3030
31- expect ( result . repoScore ) . toBeCloseTo ( 10.8666666667 , 6 ) ;
32- expect ( result . findings ) . toHaveLength ( 4 ) ;
31+ expect ( result . repoScore ) . toBeCloseTo ( 7.7 , 6 ) ;
32+ expect ( result . findings ) . toHaveLength ( 3 ) ;
3333 expect ( [ ...new Set ( result . findings . map ( ( finding ) => finding . ruleId ) ) ] . sort ( ) ) . toEqual ( [
3434 "defensive.async-noise" ,
3535 "defensive.error-obscuring" ,
36- "structure.directory-fanout-hotspot" ,
3736 "structure.pass-through-wrappers" ,
3837 ] ) ;
3938 expect ( result . fileScores . map ( ( score ) => score . path ) ) . toEqual ( [
4039 "src/service.ts" ,
4140 "src/error.ts" ,
4241 ] ) ;
43- expect ( result . directoryScores . map ( ( score ) => score . path ) ) . toEqual ( [ "src/fragments" ] ) ;
42+ expect ( result . directoryScores ) . toHaveLength ( 0 ) ;
4443 } ) ;
4544
4645 test ( "mixed fixture localizes hotspots to the slop subtree" , async ( ) => {
@@ -50,9 +49,9 @@ describe("fixture regression suite", () => {
5049 createDefaultRegistry ( ) ,
5150 ) ;
5251
53- expect ( result . repoScore ) . toBeCloseTo ( 9 .7, 6 ) ;
52+ expect ( result . repoScore ) . toBeCloseTo ( 6 .7, 6 ) ;
5453 expect ( result . fileScores [ 0 ] ?. path ) . toBe ( "src/slop/service.ts" ) ;
55- expect ( result . directoryScores [ 0 ] ?. path ) . toBe ( "src/slop" ) ;
54+ expect ( result . directoryScores ) . toHaveLength ( 0 ) ;
5655 expect ( result . fileScores . every ( ( score ) => score . path . startsWith ( "src/slop/" ) ) ) . toBe ( true ) ;
5756 } ) ;
5857
@@ -68,9 +67,9 @@ describe("fixture regression suite", () => {
6867 expect ( output . status ) . toBe ( 0 ) ;
6968
7069 const report = JSON . parse ( output . stdout ) ;
71- expect ( report . summary . repoScore ) . toBeCloseTo ( 10.8666666667 , 6 ) ;
72- expect ( report . summary . findingCount ) . toBe ( 4 ) ;
73- expect ( report . directoryScores [ 0 ] . path ) . toBe ( "src/fragments" ) ;
70+ expect ( report . summary . repoScore ) . toBeCloseTo ( 7.7 , 6 ) ;
71+ expect ( report . summary . findingCount ) . toBe ( 3 ) ;
72+ expect ( report . directoryScores ) . toHaveLength ( 0 ) ;
7473 expect ( report . fileScores [ 0 ] . path ) . toBe ( "src/service.ts" ) ;
7574 } ) ;
7675
@@ -88,11 +87,7 @@ describe("fixture regression suite", () => {
8887 "strong Found 1 error-obscuring catch block defensive.error-obscuring" ,
8988 ) ;
9089 expect ( output . stdout ) . toContain ( " at src/error.ts:2:1" ) ;
91- expect ( output . stdout ) . toContain (
92- "medium Directory fan-out is a repo hotspot (7 files vs baseline 1.0) structure.directory-fanout-hotspot" ,
93- ) ;
94- expect ( output . stdout ) . toContain ( " at src/fragments:1:1" ) ;
95- expect ( output . stdout ) . toContain ( "4 findings" ) ;
90+ expect ( output . stdout ) . toContain ( "3 findings" ) ;
9691 expect ( output . stdout ) . not . toContain ( "slop-scan report" ) ;
9792 } ) ;
9893
0 commit comments