@@ -44,7 +44,7 @@ describe("getFileChanges", () => {
4444 await fixture . writeFile ( "ignored/file.txt" , "This file should be ignored" ) ;
4545 await fixture . writeFile ( ".env" , "This file should be ignored" ) ;
4646
47- const result = await getFileChanges ( fixture . path , fixture . path , "HEAD" ) ;
47+ const result = await getFileChanges ( fixture . path , "HEAD" ) ;
4848 expect ( result ) . toEqual ( {
4949 additions : [
5050 {
@@ -75,11 +75,7 @@ describe("getFileChanges", () => {
7575 } ) ;
7676 await fixture . writeFile ( "b.txt" , "This is a new file!" ) ;
7777
78- const result = await getFileChanges (
79- fixture . path ,
80- fixture . path ,
81- "refs/heads/new-branch" ,
82- ) ;
78+ const result = await getFileChanges ( fixture . path , "refs/heads/new-branch" ) ;
8379 expect ( result ) . toEqual ( {
8480 additions : [
8581 {
@@ -102,11 +98,7 @@ describe("getFileChanges", () => {
10298 } ) ;
10399 await fixture . writeFile ( "b.txt" , "This is a new file!" ) ;
104100
105- const result = await getFileChanges (
106- fixture . path ,
107- fixture . path ,
108- "refs/tags/v1.0.0" ,
109- ) ;
101+ const result = await getFileChanges ( fixture . path , "refs/tags/v1.0.0" ) ;
110102 expect ( result ) . toEqual ( {
111103 additions : [
112104 {
@@ -132,7 +124,7 @@ describe("getFileChanges", () => {
132124
133125 await fixture . writeFile ( "b.txt" , "This is a new file!" ) ;
134126
135- const result = await getFileChanges ( fixture . path , fixture . path , commitSha ) ;
127+ const result = await getFileChanges ( fixture . path , commitSha ) ;
136128 expect ( result ) . toEqual ( {
137129 additions : [
138130 {
@@ -157,7 +149,6 @@ describe("getFileChanges", () => {
157149 await fixture . writeFile ( "nested/bar.txt" , "This is a new file!" ) ;
158150
159151 const result = await getFileChanges (
160- fixture . path ,
161152 fixture . path ,
162153 "HEAD" ,
163154 // Only include top-level files
@@ -188,7 +179,6 @@ describe("getFileChanges", () => {
188179
189180 const result = await getFileChanges (
190181 path . join ( fixture . path , "nested" ) ,
191- fixture . path ,
192182 "HEAD" ,
193183 ) ;
194184 expect ( result ) . toEqual ( {
@@ -220,7 +210,7 @@ describe("getFileChanges", () => {
220210 } ) ;
221211
222212 // Since we committed, HEAD points to the last commit and there's no change since then
223- const result = await getFileChanges ( fixture . path , fixture . path , "HEAD" ) ;
213+ const result = await getFileChanges ( fixture . path , "HEAD" ) ;
224214 expect ( result ) . toEqual ( { additions : [ ] , deletions : [ ] } ) ;
225215
226216 await fixture . rm ( "some-dir/nested" ) ;
@@ -230,9 +220,7 @@ describe("getFileChanges", () => {
230220 ) ;
231221
232222 // We made symlink changes since the last commit, so this should error now
233- await expect (
234- getFileChanges ( fixture . path , fixture . path , "HEAD" ) ,
235- ) . rejects . toThrow (
223+ await expect ( getFileChanges ( fixture . path , "HEAD" ) ) . rejects . toThrow (
236224 "Unexpected symlink at some-dir/nested, GitHub API only supports files and directories. You may need to add this file to .gitignore" ,
237225 ) ;
238226 } ) ;
@@ -255,7 +243,7 @@ describe("getFileChanges", () => {
255243 fixture . getPath ( "some-dir/nested" ) ,
256244 ) ;
257245
258- const result = await getFileChanges ( fixture . path , fixture . path , "HEAD" ) ;
246+ const result = await getFileChanges ( fixture . path , "HEAD" ) ;
259247 expect ( result ) . toEqual ( { additions : [ ] , deletions : [ ] } ) ;
260248 } ) ;
261249
@@ -269,9 +257,7 @@ describe("getFileChanges", () => {
269257 fixture . getPath ( "some-dir/nested" ) ,
270258 ) ;
271259
272- await expect (
273- getFileChanges ( fixture . path , fixture . path , "HEAD" ) ,
274- ) . rejects . toThrow (
260+ await expect ( getFileChanges ( fixture . path , "HEAD" ) ) . rejects . toThrow (
275261 "Unexpected symlink at some-dir/nested, GitHub API only supports files and directories. You may need to add this file to .gitignore" ,
276262 ) ;
277263 } ) ;
@@ -288,9 +274,7 @@ describe("getFileChanges", () => {
288274 fixture . getPath ( "some-dir/nested" ) ,
289275 ) ;
290276
291- await expect (
292- getFileChanges ( fixture . path , fixture . path , "HEAD" ) ,
293- ) . rejects . toThrow (
277+ await expect ( getFileChanges ( fixture . path , "HEAD" ) ) . rejects . toThrow (
294278 "Unexpected symlink at some-dir/nested, GitHub API only supports files and directories. You may need to add this file to .gitignore" ,
295279 ) ;
296280 } ) ;
@@ -302,9 +286,7 @@ describe("getFileChanges", () => {
302286 await fixture . writeFile ( "executable-file.sh" , "#!/bin/bash\necho hello" ) ;
303287 await fs . chmod ( fixture . getPath ( "executable-file.sh" ) , 0o755 ) ;
304288
305- await expect (
306- getFileChanges ( fixture . path , fixture . path , "HEAD" ) ,
307- ) . rejects . toThrow (
289+ await expect ( getFileChanges ( fixture . path , "HEAD" ) ) . rejects . toThrow (
308290 "Unexpected executable file at executable-file.sh, GitHub API only supports non-executable files and directories. You may need to add this file to .gitignore" ,
309291 ) ;
310292 } ) ;
0 commit comments