Skip to content

Commit

Permalink
add test for invalid engine version
Browse files Browse the repository at this point in the history
  • Loading branch information
ddollar committed Jun 21, 2012
1 parent ef979ea commit 4986728
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ testPackageJsonWithoutVersion() {
assertCapturedSuccess
}

testPackageJsonWithInvalidVersion() {
compile "package-json-invalidversion"
assertCapturedError 1 "Requested engine npm version 1.1.5 does not"
}

testNothingCached() {
cache=$(mktmpdir)
compile "package-json-version" $cache
Expand Down
9 changes: 9 additions & 0 deletions test/package-json-invalidversion/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "myapp",
"version": "0.0.1",

"engines": {
"node": "0.6.11",
"npm": "1.1.5"
}
}

0 comments on commit 4986728

Please sign in to comment.