@@ -23,8 +23,8 @@ describe("getComponentAttributes", () => {
23
23
{
24
24
$attrs : { } ,
25
25
componentData : {
26
- props :{
27
- prop1 : "value"
26
+ props : {
27
+ prop1 : "value" ,
28
28
} ,
29
29
attrs : {
30
30
value : 89 ,
@@ -33,7 +33,7 @@ describe("getComponentAttributes", () => {
33
33
} ,
34
34
{
35
35
value : 89 ,
36
- prop1 : "value"
36
+ prop1 : "value" ,
37
37
} ,
38
38
] ,
39
39
[
@@ -43,7 +43,7 @@ describe("getComponentAttributes", () => {
43
43
id : 68 ,
44
44
"data-application" : "app" ,
45
45
class : "my-class" ,
46
- other : "will be filtered"
46
+ other : "will be filtered" ,
47
47
} ,
48
48
componentData : {
49
49
attrs : {
@@ -98,6 +98,53 @@ describe("getSortableOption", () => {
98
98
draggable : ".draggable" ,
99
99
} ,
100
100
] ,
101
+ [
102
+ {
103
+ $attrs : {
104
+ value : "7" ,
105
+ draggable : ".draggable" ,
106
+ } ,
107
+ callBackBuilder : {
108
+ emit : eventName => eventName
109
+ } ,
110
+ } ,
111
+ {
112
+ value : "7" ,
113
+ draggable : ".draggable" ,
114
+ onChoose : "Choose" ,
115
+ onClone : "Clone" ,
116
+ onFilter : "Filter" ,
117
+ onSort : "Sort" ,
118
+ onUnchoose : "Unchoose" ,
119
+ } ,
120
+ ] ,
121
+ [
122
+ {
123
+ $attrs : {
124
+ property : "property" ,
125
+ } ,
126
+ callBackBuilder : {
127
+ emit : eventName => `emit-${ eventName } ` ,
128
+ manage : eventName => `manage-${ eventName } ` ,
129
+ manageAndEmit : eventName => `manageAndEmit-${ eventName } `
130
+ } ,
131
+ } ,
132
+ {
133
+ property : "property" ,
134
+ draggable : ">*" ,
135
+ onChoose : "emit-Choose" ,
136
+ onClone : "emit-Clone" ,
137
+ onFilter : "emit-Filter" ,
138
+ onSort : "emit-Sort" ,
139
+ onUnchoose : "emit-Unchoose" ,
140
+ onMove : "manage-Move" ,
141
+ onAdd : "manageAndEmit-Add" ,
142
+ onEnd : "manageAndEmit-End" ,
143
+ onStart : "manageAndEmit-Start" ,
144
+ onRemove : "manageAndEmit-Remove" ,
145
+ onUpdate : "manageAndEmit-Update" ,
146
+ } ,
147
+ ] ,
101
148
] ) ( "for %o returns %o" , ( value , expected ) => {
102
149
const actual = getSortableOption ( value ) ;
103
150
expect ( actual ) . toEqual ( expected ) ;
0 commit comments