]> gerrit.simantics Code Review - simantics/district.git/blob - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/npm-package-arg/test/bitbucket.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / npm-package-arg / test / bitbucket.js
1 var npa = require("../npa.js")
2 var path = require("path")
3
4 require("tap").test("basic", function (t) {
5   t.setMaxListeners(999)
6
7   var tests = {
8     "bitbucket:user/foo-js": {
9       name: null,
10       type: "hosted",
11       hosted: { type: "bitbucket" },
12       spec: "bitbucket:user/foo-js",
13       raw: "bitbucket:user/foo-js"
14     },
15
16     "bitbucket:user/foo-js#bar/baz": {
17       name: null,
18       type: "hosted",
19       hosted: { type: "bitbucket" },
20       spec: "bitbucket:user/foo-js#bar/baz",
21       raw: "bitbucket:user/foo-js#bar/baz"
22     },
23
24     "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /": {
25       name: null,
26       type: "hosted",
27       hosted: { type: "bitbucket" },
28       spec: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /",
29       raw: "bitbucket:user..blerg--/..foo-js# . . . . . some . tags / / /"
30     },
31
32     "bitbucket:user/foo-js#bar/baz/bin": {
33       name: null,
34       type: "hosted",
35       hosted: { type: "bitbucket" },
36       spec: "bitbucket:user/foo-js#bar/baz/bin",
37       raw: "bitbucket:user/foo-js#bar/baz/bin"
38     },
39
40     "foo@bitbucket:user/foo-js": {
41       name: "foo",
42       type: "hosted",
43       hosted: { type: "bitbucket" },
44       spec: "bitbucket:user/foo-js",
45       raw: "foo@bitbucket:user/foo-js"
46     },
47
48     "git+ssh://git@bitbucket.org/user/foo#1.2.3": {
49       name: null,
50       type: "hosted",
51       hosted: { type: "bitbucket" },
52       spec: "git+ssh://git@bitbucket.org/user/foo.git#1.2.3",
53       raw: "git+ssh://git@bitbucket.org/user/foo#1.2.3"
54     },
55
56     "https://bitbucket.org/user/foo.git": {
57       name: null,
58       type: "hosted",
59       hosted: { type: "bitbucket" },
60       spec: "git+https://bitbucket.org/user/foo.git",
61       raw: "https://bitbucket.org/user/foo.git"
62     },
63
64     "@foo/bar@git+ssh://bitbucket.org/user/foo": {
65       name: "@foo/bar",
66       scope: "@foo",
67       type: "hosted",
68       hosted: { type: "bitbucket" },
69       spec: "git+ssh://git@bitbucket.org/user/foo.git",
70       rawSpec: "git+ssh://bitbucket.org/user/foo",
71       raw: "@foo/bar@git+ssh://bitbucket.org/user/foo"
72     }
73   }
74
75   Object.keys(tests).forEach(function (arg) {
76     var res = npa(arg)
77     t.type(res, "Result", arg + " is a result")
78     t.has(res, tests[arg], arg + " matches expectations")
79   })
80
81   t.end()
82 })