@@ -1617,6 +1617,33 @@ describe("advisory rules", () => {
16171617 }
16181618 } ) ;
16191619
1620+ it ( "flags Missing test evidence for module-variant/JVM source via isCodePath + isCodeFile parity (#9322)" , ( ) => {
1621+ // Regression: isCodeFile/SOURCE_FILE_EXTENSION already admitted .mts/.cts/.mjs/.cjs and .kts/.scala/.groovy,
1622+ // but advisory.ts isCodePath lagged, so buildCheckRunAnnotations filtered those files out of annotatableFiles
1623+ // before missing_tests ran — a PR touching only those extensions was wrongly treated as non-code.
1624+ const advisory = buildPullRequestAdvisory ( repo , {
1625+ repoFullName : repo . fullName , number : 26 , title : "Add ESM/JVM source without tests" , state : "open" ,
1626+ authorLogin : "contributor" , authorAssociation : "NONE" , labels : [ ] , linkedIssues : [ ] ,
1627+ } ) ;
1628+ const sourcePaths = [
1629+ "src/loader.mts" , "src/loader.cts" , "src/loader.mjs" , "src/loader.cjs" ,
1630+ "build.kts" , "src/main/Widget.scala" , "src/main/Task.groovy" ,
1631+ ] ;
1632+ const files : PullRequestFileRecord [ ] = sourcePaths . map ( ( path ) => ( {
1633+ repoFullName : repo . fullName , pullNumber : 26 , path, additions : 11 , deletions : 0 , changes : 11 , payload : { } ,
1634+ } ) ) ;
1635+ const collisions : CollisionReport = {
1636+ repoFullName : repo . fullName , generatedAt : "2026-06-10T00:00:00.000Z" ,
1637+ summary : { clusterCount : 0 , highRiskCount : 0 , itemsReviewed : 0 } , clusters : [ ] ,
1638+ } ;
1639+
1640+ const { annotations } = buildCheckRunAnnotations ( advisory , { files, collisions, pullNumber : 26 } , "standard" ) ;
1641+
1642+ for ( const path of sourcePaths ) {
1643+ expect ( annotations . some ( ( entry ) => entry . title === "Missing test evidence" && entry . path === path ) ) . toBe ( true ) ;
1644+ }
1645+ } ) ;
1646+
16201647 it ( "flags Missing test evidence for Dart source via isCodePath + isCodeFile parity" , ( ) => {
16211648 const advisory = buildPullRequestAdvisory ( repo , {
16221649 repoFullName : repo . fullName , number : 25 , title : "Add Dart widget without tests" , state : "open" ,
0 commit comments