Skip to content

Commit a860644

Browse files
committed
Use better helpers
1 parent a0dcdea commit a860644

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

test/nodenv-package-json-engine.bats

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@ load test_helper
1919
@test 'Ignores non-matching installed versions' {
2020
in_package_for_engine '^1.0.0'
2121

22-
# For unknown reasons, nodenv-version succeeds when version-name fails,
23-
# so we're testing version-name directly
24-
run nodenv version-name
25-
assert_failure "package-json-engine: no version satisfying \`^1.0.0' installed"
26-
27-
# `which` should fail similarly
28-
run nodenv which node
29-
assert_failure "package-json-engine: no version satisfying \`^1.0.0' installed"
22+
run nodenv version
23+
# note the command completes successfully
24+
assert_success "package-json-engine: no version satisfying \`^1.0.0' installed
25+
(set by package-json-engine matching ^1.0.0)"
3026
}
3127

3228
@test 'Prefers nodenv-local over package.json' {

0 commit comments

Comments
 (0)