summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/github-url-from-username-repo/test/index.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/github-url-from-username-repo/test/index.js')
-rw-r--r--deps/npm/node_modules/github-url-from-username-repo/test/index.js21
1 files changed, 21 insertions, 0 deletions
diff --git a/deps/npm/node_modules/github-url-from-username-repo/test/index.js b/deps/npm/node_modules/github-url-from-username-repo/test/index.js
new file mode 100644
index 000000000..782a95cea
--- /dev/null
+++ b/deps/npm/node_modules/github-url-from-username-repo/test/index.js
@@ -0,0 +1,21 @@
+var assert = require("assert")
+var getUrl = require("../")
+
+describe("github url from username/repo", function () {
+ it("returns a github url for the username/repo", function () {
+ var url = getUrl("visionmedia/express")
+ assert.equal("git://github.com/visionmedia/express", url)
+ })
+ it("works with -", function () {
+ var url = getUrl("vision-media/express-package")
+ assert.equal("git://github.com/vision-media/express-package", url)
+ })
+ it("returns null if it does not match", function () {
+ var url = getUrl("package")
+ assert.deepEqual(null, url)
+ })
+ it("returns undefined if no repo/user was given", function () {
+ var url = getUrl()
+ assert.deepEqual(undefined, url)
+ })
+}) \ No newline at end of file