Skip to content
Myr

[Tests] fix nvm_list_aliases test to use mocks for LTS aliases

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Jordan Harband · committed by Jordan Harband · parent e6fa80c · Browse files · 1 file+8 added−2 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+8 added−2 removed

  • tests:+8 added−2 removed

1 file+8 added−2 removed

modified:test/fast/Aliases/nvm_list_aliases works with LTS aliases+8 added-2 removed
7 unmodified lines
8}910set -e1112MOCKS_DIR="../Unit tests/mocks"1314# sample output at the time the test was written15TAB_PATH="$MOCKS_DIR/nodejs.org-dist-index.tab"16nvm_download() {17 cat "$TAB_PATH"18}1920nvm_alias_path() {21 nvm_echo "../../../alias"22}2324nvm ls-remote >/dev/null || die 'nvm ls-remote (to populate LTS aliases) failed'2518MOCKS_DIR="../Unit tests/mocks"1926EXPECTED_OUTPUT="$(cat "$MOCKS_DIR/lts-star.txt")"27STDOUT_OUTPUT="$(nvm_list_aliases "lts/*")"28STDERR_OUTPUT="$(nvm_list_aliases "lts/*" 2>&1 >/dev/null)"29
2 unmodified lines