File tree 1 file changed +31
-0
lines changed
1 file changed +31
-0
lines changed Original file line number Diff line number Diff line change @@ -674,6 +674,37 @@ describe('[SSG] i18n routing', () => {
674
674
expect ( html ) . to . include ( 'url=/new-site/en/start' ) ;
675
675
} ) ;
676
676
} ) ;
677
+
678
+ describe ( 'i18n routing with fallback and redirect' , ( ) => {
679
+ /** @type {import('./test-utils').Fixture } */
680
+ let fixture ;
681
+
682
+ before ( async ( ) => {
683
+ fixture = await loadFixture ( {
684
+ root : './fixtures/i18n-routing-fallback/' ,
685
+ redirects : {
686
+ '/' : '/en' ,
687
+ } ,
688
+ experimental : {
689
+ i18n : {
690
+ defaultLocale : 'en' ,
691
+ locales : [ 'en' , 'pt' , 'it' ] ,
692
+ fallback : {
693
+ it : 'en' ,
694
+ } ,
695
+ } ,
696
+ } ,
697
+ } ) ;
698
+ await fixture . build ( ) ;
699
+ } ) ;
700
+
701
+ it ( 'should render the en locale' , async ( ) => {
702
+ let html = await fixture . readFile ( '/index.html' ) ;
703
+ let $ = cheerio . load ( html ) ;
704
+ expect ( html ) . to . include ( 'http-equiv="refresh' ) ;
705
+ expect ( html ) . to . include ( 'Redirecting to: /en' ) ;
706
+ } ) ;
707
+ } ) ;
677
708
} ) ;
678
709
describe ( '[SSR] i18n routing' , ( ) => {
679
710
let app ;
You can’t perform that action at this time.
0 commit comments