@@ -65,9 +65,9 @@ describe('cljstyle tests', () => {
6565 describe ( 'getArtifactName' , ( ) => {
6666 test . each `
6767 platform | artifact
68- ${ 'darwin' } | ${ `cljstyle_1.2.3_macos .zip` }
69- ${ 'linux' } | ${ `cljstyle_1.2.3_linux .zip` }
70- ${ 'foobar' } | ${ `cljstyle_1.2.3_linux .zip` }
68+ ${ 'darwin' } | ${ `cljstyle_1.2.3_macos_amd64 .zip` }
69+ ${ 'linux' } | ${ `cljstyle_1.2.3_linux_amd64 .zip` }
70+ ${ 'foobar' } | ${ `cljstyle_1.2.3_linux_amd64 .zip` }
7171 ` ( '$platform -> $artifact' , ( { platform, artifact} ) => {
7272 os . platform . mockReturnValueOnce ( platform as never )
7373 expect ( cljstyle . getArtifactName ( '1.2.3' ) ) . toBe ( artifact )
@@ -76,14 +76,17 @@ describe('cljstyle tests', () => {
7676
7777 describe ( 'getArtifactUrl' , ( ) => {
7878 test . each `
79- platform | artifact
80- ${ 'darwin' } | ${ `cljstyle_1.2.3_macos.zip` }
81- ${ 'linux' } | ${ `cljstyle_1.2.3_linux.zip` }
82- ${ 'foobar' } | ${ `cljstyle_1.2.3_linux.zip` }
83- ` ( '$platform -> $artifact' , ( { platform, artifact} ) => {
79+ platform | version | artifact
80+ ${ 'darwin' } | ${ '1.2.3' } | ${ `cljstyle_1.2.3_macos_amd64.zip` }
81+ ${ 'linux' } | ${ '1.2.3' } | ${ `cljstyle_1.2.3_linux_amd64.zip` }
82+ ${ 'foobar' } | ${ '1.2.3' } | ${ `cljstyle_1.2.3_linux_amd64.zip` }
83+ ${ 'darwin' } | ${ '0.15.0' } | ${ `cljstyle_0.15.0_macos.zip` }
84+ ${ 'linux' } | ${ '0.15.0' } | ${ `cljstyle_0.15.0_linux.zip` }
85+ ${ 'foobar' } | ${ '0.15.0' } | ${ `cljstyle_0.15.0_linux.zip` }
86+ ` ( '$platform -> $artifact' , ( { platform, version, artifact} ) => {
8487 os . platform . mockReturnValueOnce ( platform as never )
85- expect ( cljstyle . getArtifactUrl ( '1.2.3' ) ) . toBe (
86- `https://github.com/greglook/cljstyle/releases/download/1.2.3 /${ artifact } `
88+ expect ( cljstyle . getArtifactUrl ( version ) ) . toBe (
89+ `https://github.com/greglook/cljstyle/releases/download/${ version } /${ artifact } `
8790 )
8891 } )
8992 } )
@@ -116,7 +119,7 @@ describe('cljstyle tests', () => {
116119
117120 expect ( tc . find ) . toHaveBeenCalledWith ( 'cljstyle' , '1.2.3' )
118121 expect ( tc . downloadTool ) . toHaveBeenCalledWith (
119- 'https://github.com/greglook/cljstyle/releases/download/1.2.3/cljstyle_1.2.3_linux .zip' ,
122+ 'https://github.com/greglook/cljstyle/releases/download/1.2.3/cljstyle_1.2.3_linux_amd64 .zip' ,
120123 undefined ,
121124 'token 123'
122125 )
@@ -140,7 +143,7 @@ describe('cljstyle tests', () => {
140143 )
141144 expect ( tc . find ) . toHaveBeenCalledWith ( 'cljstyle' , '9.9.9' )
142145 expect ( tc . downloadTool ) . toHaveBeenCalledWith (
143- 'https://github.com/greglook/cljstyle/releases/download/9.9.9/cljstyle_9.9.9_linux .zip' ,
146+ 'https://github.com/greglook/cljstyle/releases/download/9.9.9/cljstyle_9.9.9_linux_amd64 .zip' ,
144147 undefined ,
145148 'token 123'
146149 )
0 commit comments