diff options
author | isaacs <i@izs.me> | 2014-04-10 22:06:45 +0400 |
---|---|---|
committer | isaacs <i@izs.me> | 2014-04-10 22:06:45 +0400 |
commit | b4aeabeeb81f14505416e0b0c4a5001f422044d2 (patch) | |
tree | dc02bea98a008095be1837e3e13aaea5249bb984 /test | |
parent | 7d0aec2ff0b36914d2c11b55bda3a1711be4cd33 (diff) |
test: Add test to verify npm-registry-mock version
I keep getting myself into weird cases where I have an outdated copy of
npm-registry-mock, and so tests fail, and I spend several minutes digging
only to find that it's because I didn't update after the package.json dep
changed.
Add a test to alert to this situation, which will run BEFORE all the other
tests start failing horribly.
Diffstat (limited to 'test')
-rw-r--r-- | test/tap/00-check-mock-dep.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/tap/00-check-mock-dep.js b/test/tap/00-check-mock-dep.js new file mode 100644 index 000000000..c4d2ff2c2 --- /dev/null +++ b/test/tap/00-check-mock-dep.js @@ -0,0 +1,15 @@ +console.log("TAP Version 13") + +process.on("uncaughtException", function(er) { + console.log("not ok - Failed checking mock registry dep. Expect much fail!") + console.log("1..1") + process.exit(1) +}) + +var assert = require("assert") +var semver = require("semver") +var mock = require("npm-registry-mock/package.json").version +var req = require("../../package.json").devDependencies["npm-registry-mock"] +assert(semver.satisfies(mock, req)) +console.log("ok") +console.log("1..1") |