0
0
mirror of https://github.com/tj/n.git synced 2024-11-22 11:37:26 +01:00
n/test/tests/lookup.bats
2020-12-20 19:10:34 +13:00

36 lines
710 B
Bash

#!/usr/bin/env bats
load shared-functions
function setup() {
unset_n_env
}
@test "n --lts" {
output="$(n --lts)"
local expected_version
expected_version="$(display_remote_version lts)"
expected_version="${expected_version#v}"
[ "${output}" = "${expected_version}" ]
}
@test "n --stable" {
output="$(n --stable)"
local expected_version
expected_version="$(display_remote_version lts)"
expected_version="${expected_version#v}"
[ "${output}" = "${expected_version}" ]
}
@test "n --latest" {
output="$(n --latest)"
local expected_version
expected_version="$(display_remote_version latest)"
expected_version="${expected_version#v}"
[ "${output}" = "${expected_version}" ]
}