diff options
author | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-08-19 11:17:36 -0400 |
---|---|---|
committer | Timothy J Fontaine <tjfontaine@gmail.com> | 2014-08-19 11:17:36 -0400 |
commit | 6a11bfe74bcbb4fbafb8877322c847fc2e2befc2 (patch) | |
tree | 749e69eea8d96a7422e6dde5bd4ac13745af7422 /deps/npm/node_modules/github-url-from-git/Readme.md | |
parent | d1dd0d6b388a254468a0d3fa92b7a51847611a0f (diff) | |
download | node-new-6a11bfe74bcbb4fbafb8877322c847fc2e2befc2.tar.gz |
npm: Update to v1.4.23
Diffstat (limited to 'deps/npm/node_modules/github-url-from-git/Readme.md')
-rw-r--r-- | deps/npm/node_modules/github-url-from-git/Readme.md | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/deps/npm/node_modules/github-url-from-git/Readme.md b/deps/npm/node_modules/github-url-from-git/Readme.md index d027e8ec66..0525e44ec4 100644 --- a/deps/npm/node_modules/github-url-from-git/Readme.md +++ b/deps/npm/node_modules/github-url-from-git/Readme.md @@ -28,6 +28,23 @@ describe('parse(url)', function(){ assert(null == parse(url)); }) + it('should parse git@github.com:bcoe/thumbd.git', function() { + var url = 'git@github.com:bcoe/thumbd.git'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse git@github.com:bcoe/thumbd.git#2.7.0', function() { + var url = 'git@github.com:bcoe/thumbd.git#2.7.0'; + parse(url).should.eql('https://github.com/bcoe/thumbd'); + }) + + it('should parse https://EastCloud@github.com/EastCloud/node-websockets.git', function() { + var url = 'https://EastCloud@github.com/EastCloud/node-websockets.git'; + parse(url).should.eql('https://github.com/EastCloud/node-websockets'); + }) + + // gist urls. + it('should parse git@gist urls', function() { var url = 'git@gist.github.com:3135914.git'; parse(url).should.equal('https://gist.github.com/3135914') @@ -37,5 +54,29 @@ describe('parse(url)', function(){ var url = 'https://gist.github.com/3135914.git'; parse(url).should.equal('https://gist.github.com/3135914') }) + + // Handle arbitrary GitHub Enterprise domains. + + it('should parse parse extra GHE urls provided', function() { + var url = 'git://github.example.com/treygriffith/cellar.git'; + parse( + url, {extraBaseUrls: ['github.example.com']} + ).should.equal('https://github.example.com/treygriffith/cellar'); + }); + + it('should parse GHE urls with multiple subdomains', function() { + var url = 'git://github.internal.example.com/treygriffith/cellar.git'; + parse( + url, {extraBaseUrls: ['github.internal.example.com']} + ).should.equal('https://github.internal.example.com/treygriffith/cellar'); + }); +}) + +describe('re', function() { + it('should expose GitHub url parsing regex', function() { + parse.re.source.should.equal( + /^(?:https?:\/\/|git:\/\/)?(?:[^@]+@)?(gist.github.com|github.com)[:\/]([^\/]+\/[^\/]+?|[0-9]+)$/.source + ) + }); }) ``` |