Skip to content

Commit 58078e9

Browse files
Set our expectations
1 parent a0b139a commit 58078e9

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/setup-beam.test.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,22 @@ describe('.getOTPVersion(_) - Elixir', () => {
541541
})
542542

543543
it('returns the expected value', async () => {
544+
const previousRunnerArch = process.env.RUNNER_ARCH
545+
process.env.RUNNER_ARCH = 'X64'
546+
547+
spec = '<26'
548+
// assuming this won't be bumped, since it's out-of-support from Erlang/OTP
549+
expected = 'OTP-25.3.2.21'
550+
got = await setupBeam.getOTPVersion(spec, 'ubuntu-20.04')
551+
assert.deepStrictEqual(got, expected)
552+
let otpForElixir = got
553+
554+
spec = '<1.17'
555+
expected = 'v1.16.3-otp-25' // the 25 is coming from the previous test (otpForElixir)
556+
got = await setupBeam.getElixirVersion(spec, otpForElixir)
557+
assert.deepStrictEqual(got, expected)
558+
process.env.RUNNER_ARCH = previousRunnerArch
559+
544560
spec = '1.1.x'
545561
otpVersion = 'OTP-17'
546562
expected = 'v1.1.1-otp-17'

0 commit comments

Comments
 (0)