mirror of
https://github.com/erlef/setup-beam.git
synced 2026-07-29 11:10:48 +00:00
Add basic unit tests
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
const {getElixirVersion} = require('../src/setup-elixir')
|
||||
|
||||
describe('getElixirVersion', () => {
|
||||
test('actual version parsing', async () => {
|
||||
const vsn = await getElixirVersion('v1.10.x', '23')
|
||||
expect(vsn).toEqual(['v1.10.4', '23'])
|
||||
})
|
||||
|
||||
test('version range parsing', async () => {
|
||||
const vsn = await getElixirVersion('^v1.10', '23')
|
||||
expect(vsn).toEqual(['v1.10.4', '23'])
|
||||
})
|
||||
|
||||
test('pre-release versions', async () => {
|
||||
const vsn = await getElixirVersion('v1.11.0-rc.0', '23')
|
||||
expect(vsn).toEqual(['v1.11.0-rc.0', '23'])
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user