@@ -54,7 +54,7 @@ describe("[env variable mock]", () => {
5454
5555 test ( "getIssue fails gracefully on connection issues" , async ( ) => {
5656 expect . assertions ( 1 ) ;
57- await expect ( getIssue ( ) ) . rejects . toThrowError ( IssueListError ) ;
57+ await expect ( getIssue ( ) ) . rejects . toThrow ( IssueListError ) ;
5858 } ) ;
5959
6060 test ( "getIssue fails gracefully on nonexistent repo" , async ( ) => {
@@ -65,7 +65,7 @@ describe("[env variable mock]", () => {
6565 . query ( { creator : "github-actions[bot]" , labels : "wpvc" } )
6666 . reply ( 404 ) ;
6767
68- await expect ( getIssue ( ) ) . rejects . toThrowError ( IssueListError ) ;
68+ await expect ( getIssue ( ) ) . rejects . toThrow ( IssueListError ) ;
6969 } ) ;
7070
7171 test ( "commentOnIssue works correctly" , async ( ) => {
@@ -85,7 +85,7 @@ describe("[env variable mock]", () => {
8585
8686 test ( "commentOnIssue fails gracefully on connection issues" , async ( ) => {
8787 expect . assertions ( 1 ) ;
88- await expect ( commentOnIssue ( 123 , "ISSUE_BODY" ) ) . rejects . toThrowError (
88+ await expect ( commentOnIssue ( 123 , "ISSUE_BODY" ) ) . rejects . toThrow (
8989 IssueCommentError ,
9090 ) ;
9191 } ) ;
@@ -101,7 +101,7 @@ describe("[env variable mock]", () => {
101101 } )
102102 . reply ( 404 ) ;
103103
104- await expect ( commentOnIssue ( 123 , issueBody ) ) . rejects . toThrowError (
104+ await expect ( commentOnIssue ( 123 , issueBody ) ) . rejects . toThrow (
105105 IssueCommentError ,
106106 ) ;
107107 expect ( scope . isDone ( ) ) . toBe ( true ) ;
@@ -122,7 +122,7 @@ describe("[env variable mock]", () => {
122122
123123 test ( "closeIssue fails gracefully on connection issues" , async ( ) => {
124124 expect . assertions ( 1 ) ;
125- await expect ( closeIssue ( 123 ) ) . rejects . toThrowError ( IssueUpdateError ) ;
125+ await expect ( closeIssue ( 123 ) ) . rejects . toThrow ( IssueUpdateError ) ;
126126 } ) ;
127127
128128 test ( "closeIssue fails gracefully on nonexistent repo" , async ( ) => {
@@ -134,7 +134,7 @@ describe("[env variable mock]", () => {
134134 } )
135135 . reply ( 404 ) ;
136136
137- await expect ( closeIssue ( 123 ) ) . rejects . toThrowError ( IssueUpdateError ) ;
137+ await expect ( closeIssue ( 123 ) ) . rejects . toThrow ( IssueUpdateError ) ;
138138 expect ( scope . isDone ( ) ) . toBe ( true ) ;
139139 } ) ;
140140
@@ -181,19 +181,19 @@ describe("[env variable mock]", () => {
181181 test ( "createIssue fails gracefully on connection issues" , async ( ) => {
182182 expect . assertions ( 1 ) ;
183183
184- await expect (
185- createIssue ( "ISSUE_TITLE" , "ISSUE_BODY" , [ ] ) ,
186- ) . rejects . toThrowError ( IssueCreationError ) ;
184+ await expect ( createIssue ( "ISSUE_TITLE" , "ISSUE_BODY" , [ ] ) ) . rejects . toThrow (
185+ IssueCreationError ,
186+ ) ;
187187 } ) ;
188188
189189 test ( "createIssue fails gracefully on nonexistent repo" , async ( ) => {
190190 expect . assertions ( 1 ) ;
191191
192192 nock ( "https://api.github.com" ) . post ( "/repos/OWNER/REPO/issues" ) . reply ( 404 ) ;
193193
194- await expect (
195- createIssue ( "ISSUE_TITLE" , "ISSUE_BODY" , [ ] ) ,
196- ) . rejects . toThrowError ( IssueCreationError ) ;
194+ await expect ( createIssue ( "ISSUE_TITLE" , "ISSUE_BODY" , [ ] ) ) . rejects . toThrow (
195+ IssueCreationError ,
196+ ) ;
197197 } ) ;
198198
199199 test ( "updateIssue works correctly with an up-to-date-issue" , async ( ) => {
@@ -254,9 +254,7 @@ describe("[env variable mock]", () => {
254254 . patch ( "/repos/OWNER/REPO/issues/123" , { body, title } )
255255 . reply ( 200 ) ;
256256
257- await expect ( updateIssue ( 123 , title , body ) ) . rejects . toThrowError (
258- GetIssueError ,
259- ) ;
257+ await expect ( updateIssue ( 123 , title , body ) ) . rejects . toThrow ( GetIssueError ) ;
260258 } ) ;
261259
262260 test ( "updateIssue fails gracefully on connection issues on updating the existing issue" , async ( ) => {
@@ -269,7 +267,7 @@ describe("[env variable mock]", () => {
269267 . get ( "/repos/OWNER/REPO/issues/123" )
270268 . reply ( 200 , { body, title : "WRONG_TITLE" } ) ;
271269
272- await expect ( updateIssue ( 123 , title , body ) ) . rejects . toThrowError (
270+ await expect ( updateIssue ( 123 , title , body ) ) . rejects . toThrow (
273271 IssueUpdateError ,
274272 ) ;
275273 expect ( scope . isDone ( ) ) . toBe ( true ) ;
@@ -284,8 +282,8 @@ describe("[env variable mock]", () => {
284282 . patch ( "/repos/OWNER/REPO/issues/123" )
285283 . reply ( 404 ) ;
286284
287- await expect (
288- updateIssue ( 123 , "ISSUE_TITLE" , "ISSUE_BODY" ) ,
289- ) . rejects . toThrowError ( GetIssueError ) ;
285+ await expect ( updateIssue ( 123 , "ISSUE_TITLE" , "ISSUE_BODY" ) ) . rejects . toThrow (
286+ GetIssueError ,
287+ ) ;
290288 } ) ;
291289} ) ;
0 commit comments