nvm-sh-nvm/test
Jordan Harband 14d01c6877
[Tests] add try/try_err helpers; convert tests to use them
Add `try` and `try_err` helper functions to `test/common.sh` that capture stdout/stderr and exit code from a single invocation, eliminating duplicate command executions in tests.
Convert all existing tests that used the `OUTPUT`/`EXIT_CODE` double-invocation pattern to use the new helpers.
Also fixes a pre-existing bug in the `nvm_die_on_prefix` test where ASCII apostrophes were used instead of U+2019 to match nvm.sh output.
2026-03-13 15:26:07 -04:00
..
fast [Tests] add try/try_err helpers; convert tests to use them 2026-03-13 15:26:07 -04:00
fixtures [New] allow .nvmrc files to support comments 2024-06-07 10:13:00 -07:00
install_script [Tests] nvm_detect_profile: refactor 2024-11-12 13:31:36 -08:00
installation_iojs [Tests] fix broken tests exposed by 863bd63 2024-08-27 12:46:40 -07:00
installation_node [actions] migrate Travis CI tests to GitHub Actions 2026-01-27 10:31:07 -08:00
mocks [Fix] fix node download link for armv8l 2023-04-29 16:41:31 -07:00
slow [Tests] add try/try_err helpers; convert tests to use them 2026-03-13 15:26:07 -04:00
sourcing [Fix] nvm_has_colors: also check if stdout is a terminal 2026-01-27 10:31:07 -08:00
xenial [Tests] move tests that fail on focal to a separate suite that runs on xenial 2022-12-22 11:26:27 -08:00
common.sh [Tests] add try/try_err helpers; convert tests to use them 2026-03-13 15:26:07 -04:00