From 0899839b9522da8c6147592752613621e42470e5 Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Mon, 9 Dec 2019 08:51:46 -0800 Subject: [PATCH] [Tests] pin `david` to v11 v11.1.0 and v12 no longer work on node 0.10; v11.1.1 should. See https://github.com/alanshaw/david/issues/159 --- test/slow/nvm reinstall-packages/should work as expected | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/slow/nvm reinstall-packages/should work as expected b/test/slow/nvm reinstall-packages/should work as expected index 68c0fb1..fdc3800 100755 --- a/test/slow/nvm reinstall-packages/should work as expected +++ b/test/slow/nvm reinstall-packages/should work as expected @@ -10,9 +10,10 @@ nvm exec 0.10.29 npm install -g npm@~1.4.11 && nvm install-latest-npm # this is nvm use 0.10.28 (cd test-npmlink && npm link) -EXPECTED_PACKAGES="autoprefixer bower david grunt-cli grunth-cli http-server jshint marked node-gyp npmlist recursive-blame spawn-sync test-npmlink uglify-js" +EXPECTED_PACKAGES="autoprefixer bower david grunt-cli grunth-cli http-server jshint marked node-gyp npmlist recursive-blame spawn-sync test-npmlink uglify-js yo" +EXPECTED_PACKAGES_INSTALL="autoprefixer bower david@11 grunt-cli grunth-cli http-server jshint marked node-gyp npmlist recursive-blame spawn-sync test-npmlink uglify-js yo@1" -echo "$EXPECTED_PACKAGES yo@1" | sed -e 's/test-npmlink //' | xargs npm install -g --quiet +echo "$EXPECTED_PACKAGES_INSTALL" | sed -e 's/test-npmlink //' | xargs npm install -g --quiet get_packages() { npm list -g --depth=0 | \sed -e '1 d' -e 's/^.* \(.*\)@.*/\1/' -e '/^npm$/ d' | xargs @@ -24,7 +25,7 @@ ORIGINAL_PACKAGES=$(get_packages) nvm reinstall-packages 0.10.28 FINAL_PACKAGES=$(get_packages) -[ "$FINAL_PACKAGES" = "$EXPECTED_PACKAGES yo" ] || die "final packages ($FINAL_PACKAGES) did not match expected packages ($EXPECTED_PACKAGES)" +[ "$FINAL_PACKAGES" = "$EXPECTED_PACKAGES" ] || die "final packages ($FINAL_PACKAGES) did not match expected packages ($EXPECTED_PACKAGES)" [ "$ORIGINAL_PACKAGES" != "$FINAL_PACKAGES" ] || die "original packages matched final packages ($ORIGINAL_PACKAGES)" [ $(test-npmlink) = 'ok' ] || die "failed to run test-npmlink"