File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -110,14 +110,14 @@ describe("Action", () => {
110110 it ( "should throw if invalid workflow inputs JSON is provided" , ( ) => {
111111 mockEnvConfig . workflow_inputs = "{" ;
112112
113- expect ( ( ) => getConfig ( ) ) . toThrowError ( ) ;
113+ expect ( ( ) => getConfig ( ) ) . toThrow ( Error ) ;
114114 } ) ;
115115
116116 it ( "should handle workflow inputs JSON containing strings numbers or booleans" , ( ) => {
117117 mockEnvConfig . workflow_inputs =
118118 '{"cake":"delicious","pie":9001,"parfait":false}' ;
119119
120- expect ( ( ) => getConfig ( ) ) . not . toThrowError ( ) ;
120+ expect ( ( ) => getConfig ( ) ) . not . toThrow ( Error ) ;
121121 } ) ;
122122
123123 it ( "should throw if a workflow inputs JSON doesn't contain strings numbers or booleans" , ( ) => {
@@ -128,7 +128,7 @@ describe("Action", () => {
128128 const callAndAssert = ( input : string , errorMsg : string ) => {
129129 debugMock . mockClear ( ) ;
130130 mockEnvConfig . workflow_inputs = input ;
131- expect ( ( ) => getConfig ( ) ) . toThrowError ( errorMsg ) ;
131+ expect ( ( ) => getConfig ( ) ) . toThrow ( errorMsg ) ;
132132 expect ( debugMock ) . toHaveBeenCalledOnce ( ) ;
133133 } ;
134134
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ describe("return-dispatch", () => {
102102 const workflowIdPromise = getWorkflowId ( "hello.yml" ) ;
103103
104104 // Behaviour
105- await expect ( workflowIdPromise ) . rejects . toThrowError ( ) ;
105+ await expect ( workflowIdPromise ) . rejects . toThrow ( Error ) ;
106106
107107 // Logging
108108 assertOnlyCalled ( coreInfoLogMock ) ;
@@ -378,7 +378,7 @@ describe("return-dispatch", () => {
378378
379379 await expect ( ( ) =>
380380 attemptToFindRunId ( new RegExp ( testId ) , [ 0 ] ) ,
381- ) . rejects . toThrowError ( unhandledError ) ;
381+ ) . rejects . toThrow ( unhandledError ) ;
382382
383383 // Behaviour
384384 expect ( getWorkflowRunJobStepMock ) . toHaveBeenCalledOnce ( ) ;
You can’t perform that action at this time.
0 commit comments