]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/semver-tag.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / test / tap / semver-tag.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/semver-tag.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/test/tap/semver-tag.js
new file mode 100644 (file)
index 0000000..03dcdf8
--- /dev/null
@@ -0,0 +1,15 @@
+// should not allow tagging with a valid semver range
+var common = require("../common-tap.js")
+var test = require("tap").test
+
+test("try to tag with semver range as tag name", function (t) {
+  var cmd = ["tag", "zzzz@1.2.3", "v2.x", "--registry=http://localhost"]
+  common.npm(cmd, {
+    stdio: "pipe"
+  }, function (er, code, so, se) {
+    if (er) throw er
+    t.similar(se, /Tag name must not be a valid SemVer range: v2.x\n/)
+    t.equal(code, 1)
+    t.end()
+  })
+})