1 var npa = require("../npa.js")
2 var path = require("path")
4 require("tap").test("basic", function (t) {
8 "gitlab:user/foo-js": {
11 hosted: { type: "gitlab" },
12 raw: "gitlab:user/foo-js",
13 raw: "gitlab:user/foo-js"
16 "gitlab:user/foo-js#bar/baz": {
19 hosted: { type: "gitlab" },
20 raw: "gitlab:user/foo-js#bar/baz",
21 raw: "gitlab:user/foo-js#bar/baz"
24 "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /": {
27 hosted: { type: "gitlab" },
28 spec: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /",
29 raw: "gitlab:user..blerg--/..foo-js# . . . . . some . tags / / /"
32 "gitlab:user/foo-js#bar/baz/bin": {
35 hosted: { type: "gitlab" },
36 spec: "gitlab:user/foo-js#bar/baz/bin",
37 raw: "gitlab:user/foo-js#bar/baz/bin"
40 "foo@gitlab:user/foo-js": {
43 hosted: { type: "gitlab" },
44 spec: "gitlab:user/foo-js",
45 raw: "foo@gitlab:user/foo-js"
48 "git+ssh://git@gitlab.com/user/foo#1.2.3": {
51 hosted: { type: "gitlab" },
52 spec: "git+ssh://git@gitlab.com/user/foo.git#1.2.3",
53 raw: "git+ssh://git@gitlab.com/user/foo#1.2.3"
56 "https://gitlab.com/user/foo.git": {
59 hosted: { type: "gitlab" },
60 spec: "git+https://gitlab.com/user/foo.git",
61 raw: "https://gitlab.com/user/foo.git"
64 "@foo/bar@git+ssh://gitlab.com/user/foo": {
68 hosted: { type: "gitlab" },
69 spec: "git+ssh://git@gitlab.com/user/foo.git",
70 rawSpec: "git+ssh://gitlab.com/user/foo",
71 raw: "@foo/bar@git+ssh://gitlab.com/user/foo"
75 Object.keys(tests).forEach(function (arg) {
77 t.type(res, "Result", arg + " is a result")
78 t.has(res, tests[arg], arg + " matches expectations")