@@ -23,10 +23,7 @@ describe('validationPlugin', () => {
2323 } ) ;
2424
2525 const widget = await createMerkurWidget ( {
26- $plugins : [
27- componentPlugin ,
28- ( ) => validationPlugin ( { props : propsSchema } ) ,
29- ] ,
26+ $plugins : [ componentPlugin , validationPlugin ( { props : propsSchema } ) ] ,
3027 name : 'test-widget' ,
3128 version : '1.0.0' ,
3229 props : { name : 'test' } ,
@@ -43,10 +40,7 @@ describe('validationPlugin', () => {
4340 } ) ;
4441
4542 const widget = await createMerkurWidget ( {
46- $plugins : [
47- componentPlugin ,
48- ( ) => validationPlugin ( { props : propsSchema } ) ,
49- ] ,
43+ $plugins : [ componentPlugin , validationPlugin ( { props : propsSchema } ) ] ,
5044 name : 'test-widget' ,
5145 version : '1.0.0' ,
5246 props : { } ,
@@ -111,7 +105,7 @@ describe('validationPlugin', () => {
111105 const throwWidget = await createMerkurWidget ( {
112106 $plugins : [
113107 componentPlugin ,
114- ( ) => validationPlugin ( { props : propsSchema , onError : null } ) ,
108+ validationPlugin ( { props : propsSchema , onError : null } ) ,
115109 ] ,
116110 name : 'throw-widget' ,
117111 version : '1.0.0' ,
@@ -138,8 +132,7 @@ describe('validationPlugin', () => {
138132 const customWidget = await createMerkurWidget ( {
139133 $plugins : [
140134 componentPlugin ,
141- ( ) =>
142- validationPlugin ( { props : propsSchema , onError : customHandler } ) ,
135+ validationPlugin ( { props : propsSchema , onError : customHandler } ) ,
143136 ] ,
144137 name : 'custom-widget' ,
145138 version : '1.0.0' ,
@@ -179,7 +172,7 @@ describe('validationPlugin', () => {
179172 const widget = await createMerkurWidget ( {
180173 $plugins : [
181174 componentPlugin ,
182- ( ) => validationPlugin ( { props : propsSchema , onError : null } ) ,
175+ validationPlugin ( { props : propsSchema , onError : null } ) ,
183176 ] ,
184177 name : 'test-widget' ,
185178 version : '1.0.0' ,
@@ -196,7 +189,7 @@ describe('validationPlugin', () => {
196189 const widget = await createMerkurWidget ( {
197190 $plugins : [
198191 componentPlugin ,
199- ( ) => validationPlugin ( { props : propsSchema , onError : null } ) ,
192+ validationPlugin ( { props : propsSchema , onError : null } ) ,
200193 ] ,
201194 name : 'test-widget' ,
202195 version : '1.0.0' ,
@@ -213,7 +206,7 @@ describe('validationPlugin', () => {
213206 const widget = await createMerkurWidget ( {
214207 $plugins : [
215208 componentPlugin ,
216- ( ) => validationPlugin ( { props : propsSchema , onError : null } ) ,
209+ validationPlugin ( { props : propsSchema , onError : null } ) ,
217210 ] ,
218211 name : 'test-widget' ,
219212 version : '1.0.0' ,
@@ -223,7 +216,7 @@ describe('validationPlugin', () => {
223216 } ,
224217 } ) ;
225218
226- await expect ( widget . mount ( ) ) . resolves . not . toThrow ( ) ;
219+ await expect ( widget . mount ( ) ) . rejects . toThrow ( ) ;
227220 } ) ;
228221 } ) ;
229222
@@ -235,10 +228,7 @@ describe('validationPlugin', () => {
235228 } ) ;
236229
237230 const widget = await createMerkurWidget ( {
238- $plugins : [
239- componentPlugin ,
240- ( ) => validationPlugin ( { props : propsSchema } ) ,
241- ] ,
231+ $plugins : [ componentPlugin , validationPlugin ( { props : propsSchema } ) ] ,
242232 name : 'test-widget' ,
243233 version : '1.0.0' ,
244234 props : { name : 'test' , count : 42 } ,
@@ -270,7 +260,7 @@ describe('validationPlugin', () => {
270260 const widget = await createMerkurWidget ( {
271261 $plugins : [
272262 componentPlugin ,
273- ( ) => validationPlugin ( { props : propsSchema , onError : null } ) ,
263+ validationPlugin ( { props : propsSchema , onError : null } ) ,
274264 ] ,
275265 name : 'test-widget' ,
276266 version : '1.0.0' ,
@@ -305,7 +295,7 @@ describe('validationPlugin', () => {
305295 const widget = await createMerkurWidget ( {
306296 $plugins : [
307297 componentPlugin ,
308- ( ) => validationPlugin ( { props : propsSchema , onError : null } ) ,
298+ validationPlugin ( { props : propsSchema , onError : null } ) ,
309299 ] ,
310300 name : 'test-widget' ,
311301 version : '1.0.0' ,
0 commit comments