File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ describe('Notifier', function () {
1616 markdown : 'fooMardown' ,
1717 lifetime : 10000 ,
1818 customActions :[ {
19- key : 'Cancel' ,
19+ text : 'Cancel' ,
2020 callback : sinon . spy ( )
2121 } , {
22- key : 'OK' ,
22+ text : 'OK' ,
2323 callback : sinon . spy ( )
2424 } ]
2525 } ;
Original file line number Diff line number Diff line change @@ -96,8 +96,10 @@ function add(notif, cb) {
9696 } else if ( notif . customActions ) {
9797 // wrap all of the custom functions in a close
9898 notif . customActions = notif . customActions . map ( action => {
99- action . callback = closeNotif ( notif , action . callback , action . key ) ;
100- return action ;
99+ return {
100+ key : action . text ,
101+ callback : closeNotif ( notif , action . callback , action . text )
102+ } ;
101103 } ) ;
102104 }
103105
@@ -383,10 +385,10 @@ Notifier.prototype.banner = function (msg, cb) {
383385 * markdown: 'Some markdown content',
384386 * type: 'info',
385387 * customActions: [{
386- * key : 'next',
388+ * text : 'next',
387389 * callback: function() { next(); }
388390 * }, {
389- * key : 'prev',
391+ * text : 'prev',
390392 * callback: function() { prev(); }
391393 * }]
392394 * }
You can’t perform that action at this time.
0 commit comments