@@ -67,45 +67,59 @@ describe('downloader', () => {
6767 describe ( 'getUrlVulkanSdk' , ( ) => {
6868 it ( 'should return the correct URL for Windows' , async ( ) => {
6969 ; ( platform . getPlatform as jest . Mock ) . mockReturnValue ( 'windows' )
70+ ; ( http . isDownloadable as jest . Mock ) . mockResolvedValue ( true )
7071 Object . defineProperty ( platform , 'IS_WINDOWS' , { value : true , configurable : true } )
72+
7173 const version = '1.3.250.1'
7274 const expectedUrl = `https://sdk.lunarg.com/sdk/download/${ version } /windows/VulkanSDK-${ version } -Installer.exe`
73- ; ( http . isDownloadable as jest . Mock ) . mockResolvedValue ( true )
74-
7575 const url = await getUrlVulkanSdk ( version )
7676 expect ( url ) . toBe ( expectedUrl )
77+
78+ const version2 = '1.4.313.0'
79+ const expectedUrl2 = `https://sdk.lunarg.com/sdk/download/${ version2 } /windows/vulkansdk-windows-X64-${ version2 } .exe`
80+ const url2 = await getUrlVulkanSdk ( version2 )
81+ expect ( url2 ) . toBe ( expectedUrl2 )
7782 } )
7883
7984 it ( 'should return the correct URL for Windows ARM' , async ( ) => {
8085 ; ( platform . getPlatform as jest . Mock ) . mockReturnValue ( 'windows' )
86+ ; ( http . isDownloadable as jest . Mock ) . mockResolvedValue ( true )
8187 Object . defineProperty ( platform , 'IS_WINDOWS_ARM' , { value : true , configurable : true } )
88+
8289 const version = '1.3.290.0' // 1.3.290.0 23-07-2024 is first release for Windows ARM
8390 const expectedUrl = `https://sdk.lunarg.com/sdk/download/${ version } /windows/InstallVulkanARM64-${ version } .exe`
84- ; ( http . isDownloadable as jest . Mock ) . mockResolvedValue ( true )
85-
8691 const url = await getUrlVulkanSdk ( version )
8792 expect ( url ) . toBe ( expectedUrl )
93+
94+ const version2 = '1.4.313.0' // 1.4.313.0 06-05-2025 filename changed
95+ const expectedUrl2 = `https://sdk.lunarg.com/sdk/download/${ version2 } /windows/vulkansdk-windows-ARM64-${ version2 } .exe`
96+ const url2 = await getUrlVulkanSdk ( version2 )
97+ expect ( url2 ) . toBe ( expectedUrl2 )
8898 } )
8999
90100 it ( 'should return the correct URL for Linux' , async ( ) => {
91101 ; ( platform . getPlatform as jest . Mock ) . mockReturnValue ( 'linux' )
102+ ; ( http . isDownloadable as jest . Mock ) . mockResolvedValue ( true )
103+
92104 Object . defineProperty ( platform , 'IS_WINDOWS' , { value : false , configurable : true } )
93105 Object . defineProperty ( platform , 'IS_LINUX' , { value : true , configurable : true } )
106+
94107 const version = '1.3.250.1'
95108 const expectedUrl = `https://sdk.lunarg.com/sdk/download/${ version } /linux/vulkansdk-linux-x86_64-${ version } .tar.gz`
96- ; ( http . isDownloadable as jest . Mock ) . mockResolvedValue ( true )
97109
98110 const url = await getUrlVulkanSdk ( version )
99111 expect ( url ) . toBe ( expectedUrl )
100112 } )
101113
102114 it ( 'should return the correct URL for Mac' , async ( ) => {
103115 ; ( platform . getPlatform as jest . Mock ) . mockReturnValue ( 'mac' )
116+ ; ( http . isDownloadable as jest . Mock ) . mockResolvedValue ( true )
117+
104118 Object . defineProperty ( platform , 'IS_WINDOWS' , { value : false , configurable : true } )
105119 Object . defineProperty ( platform , 'IS_MAC' , { value : true , configurable : true } )
120+
106121 const version = '1.3.290.0'
107122 const expectedUrl = `https://sdk.lunarg.com/sdk/download/${ version } /mac/vulkansdk-macos-${ version } .dmg`
108- ; ( http . isDownloadable as jest . Mock ) . mockResolvedValue ( true )
109123
110124 const url = await getUrlVulkanSdk ( version )
111125 expect ( url ) . toBe ( expectedUrl )
0 commit comments