@@ -4,12 +4,11 @@ import nock from "nock";
44
55nock . disableNetConnect ( ) ;
66const octokit = new Octokit ( {
7- " log" : {
8- " error" : ( ) => { } ,
9- }
7+ log : {
8+ error : ( ) => { } ,
9+ } ,
1010} ) ;
1111
12-
1312function run ( body ) {
1413 return plugin ( octokit , body ) ;
1514}
@@ -23,7 +22,7 @@ test(`owner does not exist`, async () => {
2322 mockGetUser ( owner , null ) ;
2423
2524 await expect ( run ( { owner } ) ) . rejects . toEqual (
26- `The user/org '${ owner } ' could not be found`
25+ `The user/org '${ owner } ' could not be found` ,
2726 ) ;
2827} ) ;
2928
@@ -32,7 +31,7 @@ test(`team requested, but user is not an org`, async () => {
3231 mockGetUser ( "valid-user" , "User" ) ;
3332
3433 await expect ( run ( { owner } ) ) . rejects . toEqual (
35- `The provided 'owner' is not an organization, and so can not have teams`
34+ `The provided 'owner' is not an organization, and so can not have teams` ,
3635 ) ;
3736} ) ;
3837
@@ -81,7 +80,7 @@ test(`runs with defaults`, async () => {
8180 await expect (
8281 run ( {
8382 owner : "mheap" ,
84- } )
83+ } ) ,
8584 ) . resolves . toEqual ( [
8685 publicRepo ,
8786 privateRepo ,
@@ -99,7 +98,7 @@ test(`can disable forks`, async () => {
9998 run ( {
10099 owner : "mheap" ,
101100 include_forks : false ,
102- } )
101+ } ) ,
103102 ) . resolves . toEqual ( [ ] ) ;
104103} ) ;
105104
@@ -110,7 +109,7 @@ test(`allows archived`, async () => {
110109 run ( {
111110 owner : "mheap" ,
112111 include_archived : true ,
113- } )
112+ } ) ,
114113 ) . resolves . toEqual ( [ archivedRepo ] ) ;
115114} ) ;
116115
@@ -121,7 +120,7 @@ test(`allows templates`, async () => {
121120 run ( {
122121 owner : "mheap" ,
123122 include_templates : true ,
124- } )
123+ } ) ,
125124 ) . resolves . toEqual ( [ templateRepo ] ) ;
126125} ) ;
127126
@@ -132,7 +131,7 @@ test(`filters to only public`, async () => {
132131 run ( {
133132 owner : "mheap" ,
134133 visibility : "public" ,
135- } )
134+ } ) ,
136135 ) . resolves . toEqual ( [ publicRepo ] ) ;
137136} ) ;
138137
@@ -143,7 +142,7 @@ test(`filters to only private`, async () => {
143142 run ( {
144143 owner : "mheap" ,
145144 visibility : "private" ,
146- } )
145+ } ) ,
147146 ) . resolves . toEqual ( [ privateRepo ] ) ;
148147} ) ;
149148
@@ -154,7 +153,7 @@ test(`permissions: pull (success)`, async () => {
154153 run ( {
155154 owner : "mheap" ,
156155 minimum_access : "pull" ,
157- } )
156+ } ) ,
158157 ) . resolves . toEqual ( [ repoWithPull ] ) ;
159158} ) ;
160159
@@ -165,7 +164,7 @@ test(`permissions: push (success)`, async () => {
165164 run ( {
166165 owner : "mheap" ,
167166 minimum_access : "push" ,
168- } )
167+ } ) ,
169168 ) . resolves . toEqual ( [ repoWithPush ] ) ;
170169} ) ;
171170
@@ -176,7 +175,7 @@ test(`permissions: pull (success)`, async () => {
176175 run ( {
177176 owner : "mheap" ,
178177 minimum_access : "admin" ,
179- } )
178+ } ) ,
180179 ) . resolves . toEqual ( [ repoWithAdmin ] ) ;
181180} ) ;
182181
@@ -187,7 +186,7 @@ test(`permissions: pull (no auth, implicitly allowed)`, async () => {
187186 run ( {
188187 owner : "mheap" ,
189188 minimum_access : "pull" ,
190- } )
189+ } ) ,
191190 ) . resolves . toEqual ( [ publicRepo ] ) ;
192191} ) ;
193192
@@ -198,7 +197,7 @@ test(`permissions: pull (no auth, implicitly disallowed)`, async () => {
198197 run ( {
199198 owner : "mheap" ,
200199 minimum_access : "push" ,
201- } )
200+ } ) ,
202201 ) . resolves . toEqual ( [ ] ) ;
203202} ) ;
204203
@@ -209,7 +208,7 @@ test(`permissions: push (failure)`, async () => {
209208 run ( {
210209 owner : "mheap" ,
211210 minimum_access : "push" ,
212- } )
211+ } ) ,
213212 ) . resolves . toEqual ( [ ] ) ;
214213} ) ;
215214
@@ -220,7 +219,7 @@ test(`permissions: admin (failure)`, async () => {
220219 run ( {
221220 owner : "mheap" ,
222221 minimum_access : "admin" ,
223- } )
222+ } ) ,
224223 ) . resolves . toEqual ( [ ] ) ;
225224} ) ;
226225
@@ -231,7 +230,7 @@ test(`permissions: minimum_access is case insensitive`, async () => {
231230 run ( {
232231 owner : "mheap" ,
233232 minimum_access : "ADMIN" ,
234- } )
233+ } ) ,
235234 ) . resolves . toEqual ( [ repoWithAdmin ] ) ;
236235} ) ;
237236
@@ -259,7 +258,7 @@ function mockGetOrgRepos(owner, repos) {
259258
260259function mockGetTeamRepos ( owner , team_slug , repos ) {
261260 const m = nock ( "https://api.github.com" ) . get (
262- `/orgs/${ owner } /teams/${ team_slug } /repos`
261+ `/orgs/${ owner } /teams/${ team_slug } /repos` ,
263262 ) ;
264263 return m . reply ( 200 , repos ) ;
265264}
0 commit comments