diff options
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.js | 27 |
1 files changed, 20 insertions, 7 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 index 782a95ceaf..e8e7b47600 100644 --- 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 @@ -6,16 +6,29 @@ describe("github url from 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 () { + + it("returns null if no repo/user was given", function () { var url = getUrl() - assert.deepEqual(undefined, url) + assert.deepEqual(null, url) + }) + + it("works with .", function () { + var url = getUrl("component/downloader.js") + assert.equal("git://github.com/component/downloader.js", url) + }) + + it("works with . in the beginning", function () { + var url = getUrl("component/.downloader.js") + assert.equal("git://github.com/component/.downloader.js", url) + }) + + it("works with -", function () { + var url = getUrl("component/-dow-nloader.j-s") + assert.equal("git://github.com/component/-dow-nloader.j-s", url) }) -})
\ No newline at end of file +}) |