File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -47,22 +47,22 @@ describe('InternalLinkService', () => {
47
47
48
48
describe ( 'transformInternalLink' , ( ) => {
49
49
it ( 'should transform internal link by removing currentURL' , ( ) => {
50
- const result = service . transformInternalLink ( 'https://currentdomain/my-link' ) ;
50
+ const result = service . getRelativePath ( 'https://currentdomain/my-link' ) ;
51
51
expect ( result ) . toBe ( '/my-link' ) ;
52
52
} ) ;
53
53
54
54
it ( 'should transform internal link by adding leading "/" if missing' , ( ) => {
55
- const result = service . transformInternalLink ( 'currentdomain/my-link' ) ;
55
+ const result = service . getRelativePath ( 'currentdomain/my-link' ) ;
56
56
expect ( result ) . toBe ( '/my-link' ) ;
57
57
} ) ;
58
58
59
59
it ( 'should return unchanged link for external link' , ( ) => {
60
- const result = service . transformInternalLink ( 'https://externalDomain/my-link' ) ;
60
+ const result = service . getRelativePath ( 'https://externalDomain/my-link' ) ;
61
61
expect ( result ) . toBe ( 'https://externalDomain/my-link' ) ;
62
62
} ) ;
63
63
64
64
it ( 'should return unchanged link for internal link with leading "/"' , ( ) => {
65
- const result = service . transformInternalLink ( '/my-link' ) ;
65
+ const result = service . getRelativePath ( '/my-link' ) ;
66
66
expect ( result ) . toBe ( '/my-link' ) ;
67
67
} ) ;
68
68
} ) ;
You can’t perform that action at this time.
0 commit comments