Skip to content
Myr

[Tests] add `nvm exec --lts` tests.

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 42fedf6 · Browse files · 3 files+20 added−0 removed
This commit

State

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

Diff stats

3 files+20 added−0 removed

  • tests:+20 added−0 removed

3 files+20 added−0 removed

added:test/slow/nvm exec/Running "nvm exec --lts" should work+18 added
1#!/bin/sh23set -ex45die () { echo $@ ; exit 1; }67. ../../../nvm.sh89nvm install --lts || die 'nvm install --lts failed'1011NPM_VERSION_LTS="$(npm --version)"12TEST_STRING="foo bar"1314nvm use 1.0.0 && [ "$(node --version)" = "v1.0.0" ] || die "\`nvm use\` failed!"1516[ "$(nvm exec --lts npm --version | tail -1)" = "$NPM_VERSION_LTS" ] || die "`nvm exec` failed to run with the correct version"1718[ "$(nvm exec --lts bash -c "printf '$TEST_STRING'" | tail -1)" = "$TEST_STRING" ] || die "\`nvm exec\` failed to run with a command including whitespace"
modified:test/slow/nvm exec/setup_dir+1 added
1 unmodified line
23. ../../../nvm.sh4nvm install 0.10.75nvm install 1.0.06nvm install --lts78if [ -f ".nvmrc" ]; then9 mv .nvmrc .nvmrc.bak10fi
1 unmodified line
modified:test/slow/nvm exec/teardown_dir+1 added
2 unmodified lines
3. ../../../nvm.sh4nvm deactivate5nvm uninstall v0.10.76nvm uninstall v1.0.07nvm uninstall --lts89rm .nvmrc1011if [ -f ".nvmrc.bak" ]; then
3 unmodified lines