diff options
Diffstat (limited to 'node_modules/hosted-git-info/test/basic.js')
-rw-r--r-- | node_modules/hosted-git-info/test/basic.js | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/node_modules/hosted-git-info/test/basic.js b/node_modules/hosted-git-info/test/basic.js index e56ef9a05..0b93f50e2 100644 --- a/node_modules/hosted-git-info/test/basic.js +++ b/node_modules/hosted-git-info/test/basic.js @@ -1,9 +1,15 @@ -"use strict" -var HostedGit = require("../index") -var test = require("tap").test +'use strict' +var HostedGit = require('../index') +var test = require('tap').test -test("basic", function (t) { - t.is(HostedGit.fromUrl("https://google.com"), undefined, "null on failure") - - t.end() +test('basic', function (t) { + t.is(HostedGit.fromUrl('https://google.com'), undefined, 'null on failure') + t.is(HostedGit.fromUrl('https://github.com/abc/def').getDefaultRepresentation(), 'https', 'match https urls') + t.is(HostedGit.fromUrl('ssh://git@github.com/abc/def').getDefaultRepresentation(), 'sshurl', 'match ssh urls') + t.is(HostedGit.fromUrl('git+ssh://git@github.com/abc/def').getDefaultRepresentation(), 'sshurl', 'match git+ssh urls') + t.is(HostedGit.fromUrl('git+https://github.com/abc/def').getDefaultRepresentation(), 'https', 'match git+https urls') + t.is(HostedGit.fromUrl('git@github.com:abc/def').getDefaultRepresentation(), 'sshurl', 'match ssh connect strings') + t.is(HostedGit.fromUrl('git://github.com/abc/def').getDefaultRepresentation(), 'git', 'match git urls') + t.is(HostedGit.fromUrl('github:abc/def').getDefaultRepresentation(), 'shortcut', 'match shortcuts') + t.end() }) |