addons/web/static/tests/helpers/test_utils_mock.js
/**
 * logs all event going through the target widget.
 *
 * @param {Widget} widget
 */
logs all event going through the target widget.
@param {Widget} widget
logs all event going through the target widget . @param { Widget } widget
function _observe(widget) {
    var _trigger_up = widget._trigger_up.bind(widget);
    widget._trigger_up = function (event) {
        console.log('%c[event] ' + event.name, 'color: blue; font-weight: bold;', event);
        _trigger_up(event);
    };
}
function _observe ( widget ) { var _trigger_up = widget . _trigger_up . bind ( widget ) ; widget . _trigger_up = function ( event ) { console . log ( '%c[event] ' + event . name , 'color: blue; font-weight: bold;' , event ) ; _trigger_up ( event ) ; } ; }
logs all event going through the target widget.
logs all event going through the target widget .