@@ -93,6 +93,59 @@ describe('buildDownloadUrl', () => {
9393 ) . rejects . toThrowErrorMatchingInlineSnapshot ( `"your platform aix is not yet supported"` ) ;
9494 } ) ;
9595 } ) ;
96+
97+ describe ( '[email protected] ' , function ( ) { 98+ test ( 'darwin - x64' , async function ( ) {
99+ expect ( await buildDownloadUrl ( 'darwin' , 'x64' , '2.0.0' ) ) . toMatchInlineSnapshot (
100+ `"https://github.com/volta-cli/volta/releases/download/v2.0.0/volta-2.0.0-macos.tar.gz"`
101+ ) ;
102+ } ) ;
103+
104+ test ( 'darwin - arm64' , async function ( ) {
105+ expect ( await buildDownloadUrl ( 'darwin' , 'arm64' , '2.0.0' ) ) . toMatchInlineSnapshot (
106+ `"https://github.com/volta-cli/volta/releases/download/v2.0.0/volta-2.0.0-macos.tar.gz"`
107+ ) ;
108+ } ) ;
109+
110+ test ( 'linux - x64' , async function ( ) {
111+ expect ( await buildDownloadUrl ( 'linux' , 'x64' , '2.0.0' ) ) . toMatchInlineSnapshot (
112+ `"https://github.com/volta-cli/volta/releases/download/v2.0.0/volta-2.0.0-linux.tar.gz"`
113+ ) ;
114+ } ) ;
115+
116+ test ( 'linux - arm64' , async function ( ) {
117+ expect ( await buildDownloadUrl ( 'linux' , 'arm64' , '2.0.0' ) ) . toMatchInlineSnapshot (
118+ `"https://github.com/volta-cli/volta/releases/download/v2.0.0/volta-2.0.0-linux-arm.tar.gz"`
119+ ) ;
120+ } ) ;
121+
122+ test ( 'linux with variant input' , async function ( ) {
123+ expect (
124+ await buildDownloadUrl ( 'linux' , 'x64' , '1.1.0' , 'linux-openssl-rhel' )
125+ ) . toMatchInlineSnapshot (
126+ `"https://github.com/volta-cli/volta/releases/download/v1.1.0/volta-1.1.0-linux-openssl-rhel.tar.gz"`
127+ ) ;
128+ } ) ;
129+
130+ test ( 'win32 - x64' , async function ( ) {
131+ expect ( await buildDownloadUrl ( 'win32' , 'x86-64' , '2.0.0' ) ) . toMatchInlineSnapshot (
132+ `"https://github.com/volta-cli/volta/releases/download/v2.0.0/volta-2.0.0-windows-x86_64.msi"`
133+ ) ;
134+ } ) ;
135+
136+ test ( 'win32 - arm64' , async function ( ) {
137+ expect ( await buildDownloadUrl ( 'win32' , 'arm64' , '2.0.0' ) ) . toMatchInlineSnapshot (
138+ `"https://github.com/volta-cli/volta/releases/download/v2.0.0/volta-2.0.0-windows-arm64.msi"`
139+ ) ;
140+ } ) ;
141+
142+ test ( 'aix' , async function ( ) {
143+ expect (
144+ async ( ) =>
145+ await buildDownloadUrl ( 'aix' , 'hmm, wat?? (I dont know a valid arch for aix)' , '2.0.0' )
146+ ) . rejects . toThrowErrorMatchingInlineSnapshot ( `"your platform aix is not yet supported"` ) ;
147+ } ) ;
148+ } ) ;
96149} ) ;
97150
98151describe ( 'getOpenSSLVersion' , ( ) => {
0 commit comments