Skip to content

Commit 2061fba

Browse files
committed
Add more tests for artifact naming
1 parent 3b70476 commit 2061fba

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

__tests__/cljstyle.test.ts

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,17 @@ describe('cljstyle tests', () => {
7676

7777
describe('getArtifactUrl', () => {
7878
test.each`
79-
platform | artifact
80-
${'darwin'} | ${`cljstyle_1.2.3_macos_amd64.zip`}
81-
${'linux'} | ${`cljstyle_1.2.3_linux_amd64.zip`}
82-
${'foobar'} | ${`cljstyle_1.2.3_linux_amd64.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
})

0 commit comments

Comments
 (0)