@@ -24,7 +24,6 @@ describe("github url identifier helper", () => {
2424 describe ( "getNwoFromGitHubUrl method" , ( ) => {
2525 it ( "should handle invalid urls" , ( ) => {
2626 expect ( getNwoFromGitHubUrl ( "" ) ) . toBe ( undefined ) ;
27- expect ( getNwoFromGitHubUrl ( "http://github.com/foo/bar" ) ) . toBe ( undefined ) ;
2827 expect ( getNwoFromGitHubUrl ( "https://ww.github.com/foo/bar" ) ) . toBe (
2928 undefined ,
3029 ) ;
@@ -35,6 +34,7 @@ describe("github url identifier helper", () => {
3534
3635 it ( "should handle valid urls" , ( ) => {
3736 expect ( getNwoFromGitHubUrl ( "https://github.com/foo/bar" ) ) . toBe ( "foo/bar" ) ;
37+ expect ( getNwoFromGitHubUrl ( "http://github.com/foo/bar" ) ) . toBe ( "foo/bar" ) ;
3838 expect ( getNwoFromGitHubUrl ( "https://www.github.com/foo/bar" ) ) . toBe (
3939 "foo/bar" ,
4040 ) ;
@@ -47,9 +47,6 @@ describe("github url identifier helper", () => {
4747 describe ( "getOwnerFromGitHubUrl method" , ( ) => {
4848 it ( "should handle invalid urls" , ( ) => {
4949 expect ( getOwnerFromGitHubUrl ( "" ) ) . toBe ( undefined ) ;
50- expect ( getOwnerFromGitHubUrl ( "http://github.com/foo/bar" ) ) . toBe (
51- undefined ,
52- ) ;
5350 expect ( getOwnerFromGitHubUrl ( "https://ww.github.com/foo/bar" ) ) . toBe (
5451 undefined ,
5552 ) ;
@@ -58,6 +55,7 @@ describe("github url identifier helper", () => {
5855 } ) ;
5956
6057 it ( "should handle valid urls" , ( ) => {
58+ expect ( getOwnerFromGitHubUrl ( "http://github.com/foo/bar" ) ) . toBe ( "foo" ) ;
6159 expect ( getOwnerFromGitHubUrl ( "https://github.com/foo/bar" ) ) . toBe ( "foo" ) ;
6260 expect ( getOwnerFromGitHubUrl ( "https://www.github.com/foo/bar" ) ) . toBe (
6361 "foo" ,
0 commit comments