update testcase
parent
207521d54b
commit
3d69cf7437
|
@ -5,8 +5,9 @@ die () { echo "$@" ; exit 1; }
|
||||||
. ../../../nvm.sh
|
. ../../../nvm.sh
|
||||||
|
|
||||||
nvm use 0.10.28
|
nvm use 0.10.28
|
||||||
|
(cd test-npmlink && npm link)
|
||||||
|
|
||||||
EXPECTED_PACKAGES="autoprefixer bower david eslint grunt-cli grunth-cli http-server jshint marked node-gyp npmlist recursive-blame uglify-js yo"
|
EXPECTED_PACKAGES="autoprefixer bower david eslint grunt-cli grunth-cli http-server jshint marked node-gyp npmlist recursive-blame test-npmlink uglify-js yo"
|
||||||
|
|
||||||
echo "$EXPECTED_PACKAGES" | xargs npm install -g --quiet
|
echo "$EXPECTED_PACKAGES" | xargs npm install -g --quiet
|
||||||
|
|
||||||
|
@ -22,3 +23,5 @@ FINAL_PACKAGES=$(get_packages)
|
||||||
|
|
||||||
[ "$FINAL_PACKAGES" = "$EXPECTED_PACKAGES" ] || 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)"
|
[ "$ORIGINAL_PACKAGES" != "$FINAL_PACKAGES" ] || die "original packages matched final packages ($ORIGINAL_PACKAGES)"
|
||||||
|
|
||||||
|
[ $(test-npmlink) = 'ok' ] || die "failed to run test-npmlink"
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/usr/bin/env node
|
||||||
|
console.log('ok')
|
|
@ -0,0 +1,10 @@
|
||||||
|
{
|
||||||
|
"name": "test-npmlink",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"description": "Stub package for testing npm link",
|
||||||
|
"bin": {
|
||||||
|
"test-npmlink": "index.js"
|
||||||
|
},
|
||||||
|
"author": "hax",
|
||||||
|
"license": "ISC"
|
||||||
|
}
|
Loading…
Reference in New Issue