File tree Expand file tree Collapse file tree 1 file changed +15
-8
lines changed
test/unit/features/options Expand file tree Collapse file tree 1 file changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -23,18 +23,25 @@ describe('Options functional', () => {
23
23
} )
24
24
25
25
it ( 'should expose all props when not declared' , done => {
26
+ const fn = {
27
+ functional : true ,
28
+ render ( h , { props } ) {
29
+ return h ( 'div' , `${ props . msg } ${ props . kebabMsg } ` )
30
+ }
31
+ }
32
+
26
33
const vm = new Vue ( {
27
34
data : { test : 'foo' } ,
28
- template : '<div><wrap :msg="test" kebab-msg="bar"></wrap></div>' ,
29
- components : {
30
- wrap : {
31
- functional : true ,
32
- render ( h , { props } ) {
33
- return h ( 'div' , `${ props . msg } ${ props . kebabMsg } ` )
34
- }
35
- }
35
+ render ( h ) {
36
+ return h ( 'div' , [
37
+ h ( fn , {
38
+ props : { msg : this . test } ,
39
+ attrs : { 'kebab-msg' : 'bar' }
40
+ } )
41
+ ] )
36
42
}
37
43
} ) . $mount ( )
44
+
38
45
expect ( vm . $el . innerHTML ) . toBe ( '<div>foo bar</div>' )
39
46
vm . test = 'qux'
40
47
waitForUpdate ( ( ) => {
You can’t perform that action at this time.
0 commit comments