@@ -5,14 +5,14 @@ const gitUrlParse = require("..")
5
5
6
6
// Constants
7
7
const URLS = {
8
- ssh :
"[email protected] :IonicaBizau /git-url-parse"
9
- , https : "https://github.com/IonicaBizau /git-url-parse"
10
- , ftp : "ftp://github.com/IonicaBizau /git-url-parse"
11
- , ftps : "ftps://github.com/IonicaBizau /git-url-parse"
12
- , gitSsh :
"git+ssh://[email protected] /IonicaBizau /git-url-parse"
13
- , ref : "https://github.com/IonicaBizau /git-url-parse/blob/master/test/index.js"
14
- , shorthand : "IonicaBizau /git-url-parse"
15
- , commit : "https://github.com/IonicaBizau /git-url-parse/commit/9c6443245ace92d237b7b274d4606a616e071c4e"
8
+ ssh :
"[email protected] :42IonicaBizau /git-url-parse"
9
+ , https : "https://github.com/42IonicaBizau /git-url-parse"
10
+ , ftp : "ftp://github.com/42IonicaBizau /git-url-parse"
11
+ , ftps : "ftps://github.com/42IonicaBizau /git-url-parse"
12
+ , gitSsh :
"git+ssh://[email protected] /42IonicaBizau /git-url-parse"
13
+ , ref : "https://github.com/42IonicaBizau /git-url-parse/blob/master/test/index.js"
14
+ , shorthand : "42IonicaBizau /git-url-parse"
15
+ , commit : "https://github.com/42IonicaBizau /git-url-parse/commit/9c6443245ace92d237b7b274d4606a616e071c4e"
16
16
} ;
17
17
18
18
tester . describe ( "parse urls" , test => {
@@ -22,9 +22,9 @@ tester.describe("parse urls", test => {
22
22
var res = gitUrlParse ( URLS . ssh ) ;
23
23
test . expect ( res . protocol ) . toBe ( "ssh" ) ;
24
24
test . expect ( res . source ) . toBe ( "github.com" ) ;
25
- test . expect ( res . owner ) . toBe ( "IonicaBizau " ) ;
25
+ test . expect ( res . owner ) . toBe ( "42IonicaBizau " ) ;
26
26
test . expect ( res . name ) . toBe ( "git-url-parse" ) ;
27
- test . expect ( res . full_name ) . toBe ( "IonicaBizau /git-url-parse" ) ;
27
+ test . expect ( res . full_name ) . toBe ( "42IonicaBizau /git-url-parse" ) ;
28
28
test . expect ( res . href ) . toBe ( URLS . ssh ) ;
29
29
test . expect ( res . toString ( "https" ) ) . toBe ( URLS . https ) ;
30
30
test . expect ( res . toString ( "git+ssh" ) ) . toBe ( URLS . gitSsh ) ;
@@ -41,7 +41,7 @@ tester.describe("parse urls", test => {
41
41
var res = gitUrlParse ( URLS . ftp ) ;
42
42
test . expect ( res . protocol ) . toBe ( "ftp" ) ;
43
43
test . expect ( res . source ) . toBe ( "github.com" ) ;
44
- test . expect ( res . owner ) . toBe ( "IonicaBizau " ) ;
44
+ test . expect ( res . owner ) . toBe ( "42IonicaBizau " ) ;
45
45
test . expect ( res . name ) . toBe ( "git-url-parse" ) ;
46
46
test . expect ( res . href ) . toBe ( URLS . ftp ) ;
47
47
test . expect ( res . toString ( "https" ) ) . toBe ( URLS . https ) ;
@@ -54,7 +54,7 @@ tester.describe("parse urls", test => {
54
54
var res = gitUrlParse ( URLS . ftps ) ;
55
55
test . expect ( res . protocol ) . toBe ( "ftps" ) ;
56
56
test . expect ( res . source ) . toBe ( "github.com" ) ;
57
- test . expect ( res . owner ) . toBe ( "IonicaBizau " ) ;
57
+ test . expect ( res . owner ) . toBe ( "42IonicaBizau " ) ;
58
58
test . expect ( res . name ) . toBe ( "git-url-parse" ) ;
59
59
test . expect ( res . href ) . toBe ( URLS . ftps ) ;
60
60
test . expect ( res . toString ( "https" ) ) . toBe ( URLS . https ) ;
@@ -67,7 +67,7 @@ tester.describe("parse urls", test => {
67
67
var res = gitUrlParse ( URLS . https ) ;
68
68
test . expect ( res . protocol ) . toBe ( "https" ) ;
69
69
test . expect ( res . source ) . toBe ( "github.com" ) ;
70
- test . expect ( res . owner ) . toBe ( "IonicaBizau " ) ;
70
+ test . expect ( res . owner ) . toBe ( "42IonicaBizau " ) ;
71
71
test . expect ( res . name ) . toBe ( "git-url-parse" ) ;
72
72
test . expect ( res . href ) . toBe ( URLS . https ) ;
73
73
test . expect ( res . toString ( "https" ) ) . toBe ( URLS . https ) ;
@@ -77,10 +77,10 @@ tester.describe("parse urls", test => {
77
77
78
78
// HTTPS with ending slash
79
79
test . should ( "parse https urls with ending slash" , ( ) => {
80
- var res = gitUrlParse ( "https://github.com/IonicaBizau /git-url-parse/" ) ;
80
+ var res = gitUrlParse ( "https://github.com/42IonicaBizau /git-url-parse/" ) ;
81
81
test . expect ( res . protocol ) . toBe ( "https" ) ;
82
82
test . expect ( res . source ) . toBe ( "github.com" ) ;
83
- test . expect ( res . owner ) . toBe ( "IonicaBizau " ) ;
83
+ test . expect ( res . owner ) . toBe ( "42IonicaBizau " ) ;
84
84
test . expect ( res . name ) . toBe ( "git-url-parse" ) ;
85
85
test . expect ( res . toString ( "https" ) ) . toBe ( URLS . https ) ;
86
86
test . expect ( res . toString ( "git+ssh" ) ) . toBe ( URLS . gitSsh ) ;
@@ -92,7 +92,7 @@ tester.describe("parse urls", test => {
92
92
var res = gitUrlParse ( URLS . gitSsh ) ;
93
93
test . expect ( res . protocol ) . toBe ( "ssh" ) ;
94
94
test . expect ( res . source ) . toBe ( "github.com" ) ;
95
- test . expect ( res . owner ) . toBe ( "IonicaBizau " ) ;
95
+ test . expect ( res . owner ) . toBe ( "42IonicaBizau " ) ;
96
96
test . expect ( res . name ) . toBe ( "git-url-parse" ) ;
97
97
test . expect ( res . toString ( "https" ) ) . toBe ( URLS . https ) ;
98
98
test . expect ( res . toString ( "git+ssh" ) ) . toBe ( URLS . gitSsh ) ;
@@ -101,10 +101,10 @@ tester.describe("parse urls", test => {
101
101
102
102
// HTTPS with basic auth
103
103
test . should ( "parse https urls with basic auth" , ( ) => {
104
- var res = gitUrlParse ( "https://user:[email protected] /IonicaBizau /git-url-parse" ) ;
104
+ var res = gitUrlParse ( "https://user:[email protected] /42IonicaBizau /git-url-parse" ) ;
105
105
test . expect ( res . protocol ) . toBe ( "https" ) ;
106
106
test . expect ( res . source ) . toBe ( "github.com" ) ;
107
- test . expect ( res . owner ) . toBe ( "IonicaBizau " ) ;
107
+ test . expect ( res . owner ) . toBe ( "42IonicaBizau " ) ;
108
108
test . expect ( res . name ) . toBe ( "git-url-parse" ) ;
109
109
test . expect ( res . user ) . toBe ( "user:password" ) ;
110
110
} ) ;
@@ -193,7 +193,7 @@ tester.describe("parse urls", test => {
193
193
var res = gitUrlParse ( URLS . ref ) ;
194
194
test . expect ( res . protocol ) . toBe ( "https" ) ;
195
195
test . expect ( res . source ) . toBe ( "github.com" ) ;
196
- test . expect ( res . owner ) . toBe ( "IonicaBizau " ) ;
196
+ test . expect ( res . owner ) . toBe ( "42IonicaBizau " ) ;
197
197
test . expect ( res . name ) . toBe ( "git-url-parse" ) ;
198
198
test . expect ( res . href ) . toBe ( URLS . ref ) ;
199
199
test . expect ( res . ref ) . toBe ( "master" ) ;
@@ -214,11 +214,11 @@ tester.describe("parse urls", test => {
214
214
// shorthand urls
215
215
test . should ( "parse shorthand urls" , ( ) => {
216
216
var res = gitUrlParse ( URLS . shorthand ) ;
217
- test . expect ( res . owner ) . toBe ( "IonicaBizau " ) ;
217
+ test . expect ( res . owner ) . toBe ( "42IonicaBizau " ) ;
218
218
test . expect ( res . name ) . toBe ( "git-url-parse" ) ;
219
219
test . expect ( res . href ) . toBe ( URLS . shorthand ) ;
220
- test . expect ( res . full_name ) . toBe ( "IonicaBizau /git-url-parse" ) ;
221
- test . expect ( res . pathname ) . toBe ( "IonicaBizau /git-url-parse" ) ;
220
+ test . expect ( res . full_name ) . toBe ( "42IonicaBizau /git-url-parse" ) ;
221
+ test . expect ( res . pathname ) . toBe ( "42IonicaBizau /git-url-parse" ) ;
222
222
} ) ;
223
223
224
224
test . should ( "parse subdomains" , ( ) => {
0 commit comments