@@ -277,27 +277,6 @@ describe("hideOrShow", function () {
277277 expect ( Array . prototype . slice . call ( $el [ 0 ] . classList ) ) . toEqual ( [ "visible" ] ) ;
278278 } ) ;
279279
280- it ( "Single pat-update event without a transition" , function ( ) {
281- $ ( "#lab" ) . append ( '<div style="display: none"/>' ) ;
282- var $el = $ ( "#lab div" ) ;
283- jest . spyOn ( $ . fn , "trigger" ) ;
284- utils . hideOrShow (
285- $el ,
286- true ,
287- {
288- transition : "none" ,
289- effect : { duration : "fast" , easing : "swing" } ,
290- } ,
291- "depends"
292- ) ;
293- expect ( $ . fn . trigger . mock . calls . length ) . toEqual ( 1 ) ;
294- expect ( $ . fn . trigger ) . toHaveBeenCalledWith ( "pat-update" , {
295- pattern : "depends" ,
296- transition : "complete" ,
297- } ) ;
298- $ . fn . trigger . mockRestore ( ) ;
299- } ) ;
300-
301280 it ( "Fadeout with 0 duration" , function ( ) {
302281 $ ( "#lab" ) . append ( "<div/>" ) ;
303282 var $el = $ ( "#lab div" ) ;
@@ -321,6 +300,29 @@ describe("hideOrShow", function () {
321300 expect ( Array . prototype . slice . call ( $el [ 0 ] . classList ) ) . toEqual ( [ "hidden" ] ) ;
322301 } ) ;
323302
303+ it ( "Single pat-update event without a transition" , function ( ) {
304+ $ ( "#lab" ) . append ( '<div style="display: none"/>' ) ;
305+ var $el = $ ( "#lab div" ) ;
306+ jest . spyOn ( $ . fn , "trigger" ) ;
307+ utils . hideOrShow (
308+ $el ,
309+ true ,
310+ {
311+ transition : "none" ,
312+ effect : { duration : "fast" , easing : "swing" } ,
313+ } ,
314+ "depends"
315+ ) ;
316+ expect ( $ . fn . trigger . mock . calls . length ) . toEqual ( 1 ) ;
317+ expect ( $ . fn . trigger ) . toHaveBeenCalledWith ( "pat-update" , {
318+ pattern : "depends" ,
319+ action : "attribute-changed" ,
320+ dom : $el [ 0 ] ,
321+ transition : "complete" ,
322+ } ) ;
323+ $ . fn . trigger . mockRestore ( ) ;
324+ } ) ;
325+
324326 it ( "pat-update event with a transition" , async function ( ) {
325327 $ ( "#lab" ) . append ( "<div/>" ) ;
326328 var $el = $ ( "#lab div" ) ;
@@ -338,10 +340,14 @@ describe("hideOrShow", function () {
338340 expect ( $ . fn . trigger . mock . calls . length ) . toEqual ( 2 ) ;
339341 expect ( $ . fn . trigger ) . toHaveBeenCalledWith ( "pat-update" , {
340342 pattern : "depends" ,
343+ action : "attribute-changed" ,
344+ dom : $el [ 0 ] ,
341345 transition : "start" ,
342346 } ) ;
343347 expect ( $ . fn . trigger ) . toHaveBeenCalledWith ( "pat-update" , {
344348 pattern : "depends" ,
349+ action : "attribute-changed" ,
350+ dom : $el [ 0 ] ,
345351 transition : "complete" ,
346352 } ) ;
347353 $ . fn . trigger . mockRestore ( ) ;
0 commit comments