@@ -53,12 +53,20 @@ describe('config: options', () => {
5353 } )
5454 } )
5555
56- test ( 'should transform transition/layoutTransition to name' , ( ) => {
57- const { transition, layoutTransition } = getNuxtConfig ( {
58- transition : 'test-tran' ,
56+ test ( '[Compatibility] should transform transition to pageTransition' , ( ) => {
57+ const { pageTransition, transition } = getNuxtConfig ( {
58+ transition : 'test-tran'
59+ } )
60+ expect ( pageTransition ) . toMatchObject ( { name : 'test-tran' } )
61+ expect ( transition ) . toBeUndefined ( )
62+ } )
63+
64+ test ( 'should transform pageTransition/layoutTransition to name' , ( ) => {
65+ const { pageTransition, layoutTransition } = getNuxtConfig ( {
66+ pageTransition : 'test-tran' ,
5967 layoutTransition : 'test-layout-tran'
6068 } )
61- expect ( transition ) . toMatchObject ( { name : 'test-tran' } )
69+ expect ( pageTransition ) . toMatchObject ( { name : 'test-tran' } )
6270 expect ( layoutTransition ) . toMatchObject ( { name : 'test-layout-tran' } )
6371 } )
6472
@@ -96,9 +104,9 @@ describe('config: options', () => {
96104 expect ( render . ssr ) . toEqual ( true )
97105 } )
98106
99- test ( 'should add appear true in transition when no ssr' , ( ) => {
100- const { transition } = getNuxtConfig ( { render : { ssr : false } } )
101- expect ( transition . appear ) . toEqual ( true )
107+ test ( 'should add appear true in pageTransition when no ssr' , ( ) => {
108+ const { pageTransition } = getNuxtConfig ( { render : { ssr : false } } )
109+ expect ( pageTransition . appear ) . toEqual ( true )
102110 } )
103111
104112 test ( 'should return 404.html as default generate.fallback' , ( ) => {
0 commit comments