2019-05-04 09:45:53 +02:00
|
|
|
#!/usr/bin/env bats
|
|
|
|
|
|
|
|
load shared-functions
|
2020-12-21 10:50:54 +01:00
|
|
|
load '../../node_modules/bats-support/load'
|
|
|
|
load '../../node_modules/bats-assert/load'
|
2019-05-04 09:45:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
function setup() {
|
|
|
|
unset_n_env
|
|
|
|
setup_tmp_prefix
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function teardown() {
|
|
|
|
rm -rf "${TMP_PREFIX_DIR}"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-08-04 06:33:45 +02:00
|
|
|
# Testing version permutations in lsr tests
|
|
|
|
|
2019-05-04 09:45:53 +02:00
|
|
|
@test "n 4.9.1" {
|
|
|
|
n 4.9.1
|
2020-12-20 04:42:27 +01:00
|
|
|
output="$(node --version)"
|
2020-12-21 10:50:54 +01:00
|
|
|
assert_equal "${output}" "v4.9.1"
|
2019-05-04 09:45:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@test "n lts" {
|
|
|
|
n lts
|
2020-12-20 04:42:27 +01:00
|
|
|
output="$(node --version)"
|
2020-12-21 10:50:54 +01:00
|
|
|
assert_equal "${output}" "v$(display_remote_version lts)"
|
2019-05-04 09:45:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@test "n latest" {
|
|
|
|
n latest
|
2020-12-20 04:42:27 +01:00
|
|
|
output="$(node --version)"
|
2020-12-21 10:50:54 +01:00
|
|
|
assert_equal "${output}" "v$(display_remote_version latest)"
|
2019-05-04 09:45:53 +02:00
|
|
|
}
|