File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -89,29 +89,25 @@ export class Mock {
8989 * Testing interface that removes internal state from existing mocks.
9090 */
9191 reset ( ) {
92- // Clear lookup tables
93- this . inputs = { } ;
94- this . booleanInputs = { } ;
95-
96- // Reset axios mock
92+ this . _isDebug = false ;
9793 this . axios . post . mock . resetCalls ( ) ;
9894 this . axios . post . _promise = undefined ;
99-
100- // Reset apiCall mock
95+ this . booleanInputs = { } ;
10196 this . calls . mock . resetCalls ( ) ;
10297 this . calls . _resolvesWith = undefined ;
10398 this . calls . _rejectsWith = undefined ;
104-
105- // Reset core mocks
106- for ( const fn of Object . values ( this . core ) ) {
107- fn . mock ?. resetCalls ( ) ;
108- }
109- this . _isDebug = false ;
110-
111- // Reset webapi
99+ this . core . debug . mock . resetCalls ( ) ;
100+ this . core . error . mock . resetCalls ( ) ;
101+ this . core . getBooleanInput . mock . resetCalls ( ) ;
102+ this . core . getInput . mock . resetCalls ( ) ;
103+ this . core . info . mock . resetCalls ( ) ;
104+ this . core . isDebug . mock . resetCalls ( ) ;
105+ this . core . setFailed . mock . resetCalls ( ) ;
106+ this . core . setOutput . mock . resetCalls ( ) ;
107+ this . core . setSecret . mock . resetCalls ( ) ;
108+ this . core . warning . mock . resetCalls ( ) ;
109+ this . inputs = { } ;
112110 this . webapi = { } ;
113-
114- // Clear environment variables
115111 process . env . SLACK_TOKEN = "" ;
116112 process . env . SLACK_WEBHOOK_URL = "" ;
117113 }
You can’t perform that action at this time.
0 commit comments