File tree Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Expand file tree Collapse file tree 3 files changed +26
-1
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,10 @@ exports[`index should run onSocketMessage.progress and onSocketMessage['progress
5858
5959exports[`index should run onSocketMessage.progress and onSocketMessage['progress-update'] 2`] = `"12% - mock-msg."`;
6060
61+ exports[`index should run onSocketMessage.progress and onSocketMessage['progress-update'] and log plugin name 1`] = `"Progress"`;
62+
63+ exports[`index should run onSocketMessage.progress and onSocketMessage['progress-update'] and log plugin name 2`] = `"[mock-plugin] 12% - mock-msg."`;
64+
6165exports[`index should run onSocketMessage.warnings 1`] = `"Warnings while compiling."`;
6266
6367exports[`index should run onSocketMessage.warnings 2`] = `"Warnings"`;
Original file line number Diff line number Diff line change @@ -56,7 +56,11 @@ Object {
5656
5757exports[`index should run onSocketMessage.progress and onSocketMessage['progress-update'] 1`] = `"Progress"`;
5858
59- exports[`index should run onSocketMessage.progress and onSocketMessage['progress-update'] 2`] = `"[mock-plugin] 12% - mock-msg."`;
59+ exports[`index should run onSocketMessage.progress and onSocketMessage['progress-update'] 2`] = `"12% - mock-msg."`;
60+
61+ exports[`index should run onSocketMessage.progress and onSocketMessage['progress-update'] and log plugin name 1`] = `"Progress"`;
62+
63+ exports[`index should run onSocketMessage.progress and onSocketMessage['progress-update'] and log plugin name 2`] = `"[mock-plugin] 12% - mock-msg."`;
6064
6165exports[`index should run onSocketMessage.warnings 1`] = `"Warnings while compiling."`;
6266
Original file line number Diff line number Diff line change @@ -112,6 +112,23 @@ describe('index', () => {
112112 } ) ;
113113
114114 test ( "should run onSocketMessage.progress and onSocketMessage['progress-update']" , ( ) => {
115+ onSocketMessage . progress ( false ) ;
116+ onSocketMessage [ 'progress-update' ] ( {
117+ msg : 'mock-msg' ,
118+ percent : '12' ,
119+ } ) ;
120+ expect ( log . log . info ) . not . toBeCalled ( ) ;
121+ expect ( sendMessage . mock . calls [ 0 ] [ 0 ] ) . toMatchSnapshot ( ) ;
122+
123+ onSocketMessage . progress ( true ) ;
124+ onSocketMessage [ 'progress-update' ] ( {
125+ msg : 'mock-msg' ,
126+ percent : '12' ,
127+ } ) ;
128+ expect ( log . log . info . mock . calls [ 0 ] [ 0 ] ) . toMatchSnapshot ( ) ;
129+ } ) ;
130+
131+ test ( "should run onSocketMessage.progress and onSocketMessage['progress-update'] and log plugin name" , ( ) => {
115132 onSocketMessage . progress ( false ) ;
116133 onSocketMessage [ 'progress-update' ] ( {
117134 msg : 'mock-msg' ,
You can’t perform that action at this time.
0 commit comments