@@ -195,3 +195,28 @@ describe("failed builds", () => {
195195 expect ( doc ( ) . packages [ "@nativescript/android" ] . versions [ "9.1.1" ] . suspect ) . toEqual ( { jdk : [ "21" , "17" ] } ) ;
196196 } ) ;
197197} ) ;
198+
199+ describe ( "latest supported" , ( ) => {
200+ it ( "names the newest usable version when the newest stable one is not" , ( ) => {
201+ const doc = buildDocument ( {
202+ generatedAt : "2026-09-09T00:00:00.000Z" ,
203+ toolchains : { xcode : [ ] , cocoapods : [ ] , compileSdk : [ ] , buildTools : [ ] , jdk : [ { version : "26" , prerelease : true } , { version : "25" } , { version : "21" } , { version : "17" } ] , node : [ ] } ,
204+ packages : [
205+ {
206+ spec : { name : "@nativescript/android" , toolchains : [ "jdk" ] , keep : 5 } ,
207+ document : { distTags : { } , manifests : [ { version : "9.1.1" , requirements : { jdk : ">=17" } } ] } ,
208+ } ,
209+ ] ,
210+ overrides : { requirements : [ ] , advisories : [ ] } ,
211+ verified : [
212+ { package : "@nativescript/android" , version : "9.1.1" , toolchains : { jdk : "25" } , with : { nativescript : "9.1.1" , node : "24" } , outcome : "failure" , attempts : 2 , recordedAt : "2026-09-09T00:00:00Z" } ,
213+ { package : "@nativescript/android" , version : "9.1.1" , toolchains : { jdk : "21" } , with : { nativescript : "9.1.1" , node : "24" } , recordedAt : "2026-09-09T00:00:00Z" } ,
214+ ] ,
215+ } ) ;
216+ const cell = summarizeCell ( doc , "@nativescript/android" , "9.1.1" , "jdk" ) ;
217+ expect ( cell . latest ) . toMatchObject ( { version : "25" , cell : { state : "unsupported" } } ) ;
218+ expect ( cell . latestSupported ) . toMatchObject ( { version : "21" , cell : { state : "verified" } } ) ;
219+ expect ( cell . prerelease ) . toMatchObject ( { version : "26" } ) ;
220+ expect ( summarizeCell ( doc , "@nativescript/android" , "9.1.1" , "jdk" ) . latestSupported ?. version ) . not . toBe ( "17" ) ;
221+ } ) ;
222+ } ) ;
0 commit comments