@@ -404,24 +404,29 @@ export function main() {
404404      } ) ; 
405405
406406      describe ( 'event handlers' ,  ( )  =>  { 
407-         var  view ,  ctx ,  called ; 
407+         var  view ,  ctx ,  called ,   receivedEvent ,   dispatchedEvent ; 
408408
409409        function  createViewAndContext ( protoView )  { 
410410          view  =  createView ( protoView ) ; 
411411          ctx  =  view . context ; 
412412          called  =  0 ; 
413-           ctx . callMe  =  ( )  =>  called  +=  1 ; 
413+           receivedEvent  =  null ; 
414+           ctx . callMe  =  ( event )  =>  { 
415+             called  +=  1 ; 
416+             receivedEvent  =  event ; 
417+           } 
414418        } 
415419
416420        function  dispatchClick ( el )  { 
417-           DOM . dispatchEvent ( el ,  DOM . createMouseEvent ( 'click' ) ) ; 
421+           dispatchedEvent  =  DOM . createMouseEvent ( 'click' ) ; 
422+           DOM . dispatchEvent ( el ,  dispatchedEvent ) ; 
418423        } 
419424
420425        function  createProtoView ( )  { 
421426          var  pv  =  new  ProtoView ( el ( '<div class="ng-binding"><div></div></div>' ) , 
422427            new  ProtoRecordRange ( ) ) ; 
423428          pv . bindElement ( new  TestProtoElementInjector ( null ,  0 ,  [ ] ) ) ; 
424-           pv . bindEvent ( 'click' ,  parser . parseBinding ( 'callMe()' ,  null ) ) ; 
429+           pv . bindEvent ( 'click' ,  parser . parseBinding ( 'callMe(\$event )' ,  null ) ) ; 
425430          return  pv ; 
426431        } 
427432
@@ -431,6 +436,7 @@ export function main() {
431436          dispatchClick ( view . nodes [ 0 ] ) ; 
432437
433438          expect ( called ) . toEqual ( 1 ) ; 
439+           expect ( receivedEvent ) . toBe ( dispatchedEvent ) ; 
434440        } ) ; 
435441
436442        it ( 'should not fire on a bubbled native events' ,  ( )  =>  { 
@@ -448,6 +454,7 @@ export function main() {
448454
449455          view . dehydrate ( ) ; 
450456          dispatchClick ( view . nodes [ 0 ] ) ; 
457+           expect ( called ) . toEqual ( 0 ) ; 
451458        } ) ; 
452459      } ) ; 
453460
0 commit comments