@@ -114,33 +114,35 @@ describe('didiff-lib', () => {
114114 describe ( 'getPathnameFromUrl' , ( ) => {
115115 it ( 'should get slug from basic url' , ( ) => {
116116 expect ( getPathnameFromUrl ( 'https://scaleway.com/en/saas' ) ) . toMatch (
117- 'saas' ,
117+ 'en- saas' ,
118118 )
119119 } )
120120 it ( 'should get slug from complex url' , ( ) => {
121121 expect (
122122 getPathnameFromUrl ( 'https://scaleway.com/fr/dedibox/start' ) ,
123- ) . toMatch ( 'dedibox! start' )
123+ ) . toMatch ( 'fr- dedibox- start' )
124124 } )
125125 it ( 'should get slug from home url' , ( ) => {
126- expect ( getPathnameFromUrl ( 'https://scaleway.com/en/' ) ) . toMatch ( 'home' )
126+ expect ( getPathnameFromUrl ( 'https://scaleway.com/en/' ) ) . toMatch (
127+ 'en-index' ,
128+ )
127129 } )
128130 } )
129131 describe ( 'getImageInformations' , ( ) => {
130132 it ( 'should get informations about image' , ( ) => {
131133 const infos = getImageInformations ( {
132134 url : 'https://scaleway.com/en/saas' ,
133- pathname : 'saas' ,
135+ pathname : 'en- saas' ,
134136 name : 'original' ,
135137 } )
136138 const fsPath = nodePath . resolve ( __dirname , '../screenshots' )
137139
138140 expect ( infos ) . toMatchObject ( {
139141 url : 'https://scaleway.com/en/saas' ,
140142 name : 'original' ,
141- fullName : 'saas-original.png' ,
142- fullPath : `${ fsPath } /saas-original.png` ,
143- path : `${ fsPath } /saas` ,
143+ fullName : 'en- saas-original.png' ,
144+ fullPath : `${ fsPath } /en- saas-original.png` ,
145+ path : `${ fsPath } /en- saas` ,
144146 } )
145147 } )
146148 } )
0 commit comments