@@ -4,7 +4,6 @@ import { resolveImportEdges } from '../layering/model.ts';
44import { buildGraph } from './model.ts' ;
55import {
66 computeCohesionSummary ,
7- computeDominatorSummary ,
87 createDominatorAnalyzer ,
98 computeZoneSccSummary ,
109} from './structure-summary.ts' ;
@@ -13,7 +12,7 @@ function sources(entries: Record<string, string>): Map<string, string> {
1312 return new Map ( Object . entries ( entries ) ) ;
1413}
1514
16- test ( 'computeDominatorSummary excludes the dynamic-import seam and ranks bottlenecks by dominated subtree size ' , ( ) => {
15+ test ( 'the dominator analyzer excludes dynamic imports and ranks dominated subtrees ' , ( ) => {
1716 const files = sources ( {
1817 'src/core/entry.ts' : [
1918 "import { a } from './a.ts';" ,
@@ -31,7 +30,7 @@ test('computeDominatorSummary excludes the dynamic-import seam and ranks bottlen
3130 } ) ;
3231 const graph = buildGraph ( files , resolveImportEdges ( files ) ) ;
3332
34- const summary = computeDominatorSummary ( 'src/core/entry.ts' , graph ) ;
33+ const summary = createDominatorAnalyzer ( graph ) ( 'src/core/entry.ts' ) ;
3534
3635 // `lazy.ts` is reached only through a dynamic import, so it never joins the eager closure —
3736 // reachableFiles counts entry + a + b + shared + only-a, not the dynamically-loaded sixth file.
@@ -52,12 +51,12 @@ test('computeDominatorSummary excludes the dynamic-import seam and ranks bottlen
5251 ) ;
5352} ) ;
5453
55- test ( 'computeDominatorSummary rejects an entry outside the layering graph' , ( ) => {
54+ test ( 'the dominator analyzer rejects an entry outside the layering graph' , ( ) => {
5655 const files = sources ( { 'src/core/entry.ts' : 'export const entry = 1;' } ) ;
5756 const graph = buildGraph ( files , resolveImportEdges ( files ) ) ;
5857
5958 assert . throws (
60- ( ) => computeDominatorSummary ( 'src/core/missing.ts' , graph ) ,
59+ ( ) => createDominatorAnalyzer ( graph ) ( 'src/core/missing.ts' ) ,
6160 / s r c \/ c o r e \/ m i s s i n g \. t s i s n o t a p r o d u c t i o n s o u r c e f i l e / ,
6261 ) ;
6362} ) ;
0 commit comments