File tree Expand file tree Collapse file tree 1 file changed +36
-2
lines changed Expand file tree Collapse file tree 1 file changed +36
-2
lines changed Original file line number Diff line number Diff line change @@ -1799,7 +1799,41 @@ describe('e2e: Transition', () => {
1799
1799
E2E_TIMEOUT
1800
1800
)
1801
1801
1802
- // fixme
1803
- test . todo ( 'warn invalid durations' )
1802
+ test (
1803
+ 'warn invalid durations' ,
1804
+ async ( ) => {
1805
+ createApp ( {
1806
+ template : `
1807
+ <div id="container">
1808
+ <transition name="test" :duration="NaN">
1809
+ <div class="test">content</div>
1810
+ </transition>
1811
+ </div>
1812
+ `
1813
+ } ) . mount ( document . createElement ( 'div' ) )
1814
+ expect (
1815
+ `[Vue warn]: <transition> explicit duration is NaN - ` +
1816
+ 'the duration expression might be incorrect.'
1817
+ ) . toHaveBeenWarned ( )
1818
+
1819
+ createApp ( {
1820
+ template : `
1821
+ <div id="container">
1822
+ <transition name="test" :duration="{
1823
+ enter: {},
1824
+ leave: {}
1825
+ }">
1826
+ <div class="test">content</div>
1827
+ </transition>
1828
+ </div>
1829
+ `
1830
+ } ) . mount ( document . createElement ( 'div' ) )
1831
+ expect (
1832
+ `[Vue warn]: <transition> explicit duration is not a valid number - ` +
1833
+ `got ${ JSON . stringify ( { } ) } `
1834
+ ) . toHaveBeenWarned ( )
1835
+ } ,
1836
+ E2E_TIMEOUT
1837
+ )
1804
1838
} )
1805
1839
} )
You can’t perform that action at this time.
0 commit comments