@@ -71,7 +71,7 @@ test(`branch does not exist, createBranch false`, async () => {
71
71
const body = { ...validRequest , createBranch : false } ;
72
72
73
73
await expect ( run ( body ) ) . rejects . toEqual (
74
- `The branch 'new-branch-name' doesn't exist and createBranch is 'false'`
74
+ `The branch 'new-branch-name' doesn't exist and createBranch is 'false'` ,
75
75
) ;
76
76
} ) ;
77
77
@@ -81,7 +81,7 @@ test(`branch does not exist, provided base does not exist`, async () => {
81
81
const body = { ...validRequest } ;
82
82
83
83
await expect ( run ( body ) ) . rejects . toEqual (
84
- `The branch 'base-branch-name' doesn't exist`
84
+ `The branch 'base-branch-name' doesn't exist` ,
85
85
) ;
86
86
} ) ;
87
87
@@ -102,7 +102,7 @@ test(`no commit message`, async () => {
102
102
] ,
103
103
} ;
104
104
await expect ( run ( body ) ) . rejects . toEqual (
105
- `changes[].message is a required parameter`
105
+ `changes[].message is a required parameter` ,
106
106
) ;
107
107
} ) ;
108
108
@@ -117,7 +117,7 @@ test(`no files provided (empty object)`, async () => {
117
117
changes : [ { message : "Test Commit" , files : { } } ] ,
118
118
} ;
119
119
await expect ( run ( body ) ) . rejects . toEqual (
120
- `either changes[].files or changes[].filesToDelete are required`
120
+ `either changes[].files or changes[].filesToDelete are required` ,
121
121
) ;
122
122
} ) ;
123
123
@@ -129,7 +129,7 @@ test(`no files provided (missing object)`, async () => {
129
129
130
130
const body = { ...validRequest , changes : [ { message : "Test Commit" } ] } ;
131
131
await expect ( run ( body ) ) . rejects . toEqual (
132
- `either changes[].files or changes[].filesToDelete are required`
132
+ `either changes[].files or changes[].filesToDelete are required` ,
133
133
) ;
134
134
} ) ;
135
135
@@ -151,7 +151,7 @@ test(`no file contents provided`, async () => {
151
151
] ,
152
152
} ;
153
153
await expect ( run ( body ) ) . rejects . toEqual (
154
- `No file contents provided for test.md`
154
+ `No file contents provided for test.md` ,
155
155
) ;
156
156
} ) ;
157
157
@@ -441,7 +441,7 @@ test("failure (fileToDelete is missing)", async () => {
441
441
} ;
442
442
443
443
await expect ( run ( body ) ) . rejects . toEqual (
444
- "The file wow-this-file-disappeared could not be found in the repo"
444
+ "The file wow-this-file-disappeared could not be found in the repo" ,
445
445
) ;
446
446
} ) ;
447
447
@@ -459,7 +459,7 @@ test("Does not overwrite other methods", () => {
459
459
460
460
function mockGetRef ( branch , sha , success ) {
461
461
const m = nock ( "https://api.github.com" ) . get (
462
- `/repos/${ owner } /${ repo } /git/ref/heads%2F${ branch } `
462
+ `/repos/${ owner } /${ repo } /git/ref/heads%2F${ branch } ` ,
463
463
) ;
464
464
465
465
const body = {
@@ -479,7 +479,7 @@ function mockCreateBlob(content, sha) {
479
479
const expectedBody = { content : content , encoding : "base64" } ;
480
480
const m = nock ( "https://api.github.com" ) . post (
481
481
`/repos/${ owner } /${ repo } /git/blobs` ,
482
- expectedBody
482
+ expectedBody ,
483
483
) ;
484
484
485
485
const body = {
@@ -493,21 +493,21 @@ function mockCreateBlob(content, sha) {
493
493
function mockCreateBlobFileOne ( ) {
494
494
return mockCreateBlob (
495
495
"IyBUaGlzIGlzIGEgdGVzdAoKSSBob3BlIGl0IHdvcmtz" ,
496
- "afb296bb7f3e327767bdda481c4877ba4a09e02e"
496
+ "afb296bb7f3e327767bdda481c4877ba4a09e02e" ,
497
497
) ;
498
498
}
499
499
500
500
function mockCreateBlobFileTwo ( ) {
501
501
return mockCreateBlob (
502
502
"U29tZXRoaW5nIGVsc2U=" ,
503
- "a71ee6d9405fed4f6fd181c61ceb40ef10905d30"
503
+ "a71ee6d9405fed4f6fd181c61ceb40ef10905d30" ,
504
504
) ;
505
505
}
506
506
507
507
function mockCreateBlobFileThree ( ) {
508
508
return mockCreateBlob (
509
509
"V2l0aCBzb21lIGNvbnRlbnRz" ,
510
- "f65b65200aea4fecbe0db6ddac1c0848cdda1d9b"
510
+ "f65b65200aea4fecbe0db6ddac1c0848cdda1d9b" ,
511
511
) ;
512
512
}
513
513
@@ -518,7 +518,7 @@ function mockCreateBlobFileFour() {
518
518
function mockCreateBlobBase64PreEncoded ( ) {
519
519
return mockCreateBlob (
520
520
"SGVsbG8gV29ybGQ=" ,
521
- "afb296bb7f3e327767bdda481c4877ba4a09e02e"
521
+ "afb296bb7f3e327767bdda481c4877ba4a09e02e" ,
522
522
) ;
523
523
}
524
524
@@ -537,7 +537,7 @@ function mockCreateTreeSubmodule(baseTree) {
537
537
538
538
const m = nock ( "https://api.github.com" ) . post (
539
539
`/repos/${ owner } /${ repo } /git/trees` ,
540
- expectedBody
540
+ expectedBody ,
541
541
) ;
542
542
543
543
const body = {
@@ -568,7 +568,7 @@ function mockCreateTree(baseTree) {
568
568
569
569
const m = nock ( "https://api.github.com" ) . post (
570
570
`/repos/${ owner } /${ repo } /git/trees` ,
571
- expectedBody
571
+ expectedBody ,
572
572
) ;
573
573
574
574
const body = {
@@ -593,7 +593,7 @@ function mockCreateTreeSecond(baseTree) {
593
593
594
594
const m = nock ( "https://api.github.com" ) . post (
595
595
`/repos/${ owner } /${ repo } /git/trees` ,
596
- expectedBody
596
+ expectedBody ,
597
597
) ;
598
598
599
599
const body = {
@@ -618,7 +618,7 @@ function mockCreateTreeWithIgnoredDelete(baseTree) {
618
618
619
619
const m = nock ( "https://api.github.com" ) . post (
620
620
`/repos/${ owner } /${ repo } /git/trees` ,
621
- expectedBody
621
+ expectedBody ,
622
622
) ;
623
623
624
624
const body = {
@@ -650,7 +650,7 @@ function mockCreateTreeWithDelete(baseTree) {
650
650
651
651
const m = nock ( "https://api.github.com" ) . post (
652
652
`/repos/${ owner } /${ repo } /git/trees` ,
653
- expectedBody
653
+ expectedBody ,
654
654
) ;
655
655
656
656
const body = {
@@ -669,7 +669,7 @@ function mockCommitSubmodule(baseTree) {
669
669
670
670
const m = nock ( "https://api.github.com" ) . post (
671
671
`/repos/${ owner } /${ repo } /git/commits` ,
672
- expectedBody
672
+ expectedBody ,
673
673
) ;
674
674
675
675
const body = {
@@ -691,7 +691,7 @@ function mockCommit(baseTree, additional) {
691
691
692
692
const m = nock ( "https://api.github.com" ) . post (
693
693
`/repos/${ owner } /${ repo } /git/commits` ,
694
- expectedBody
694
+ expectedBody ,
695
695
) ;
696
696
697
697
const body = {
@@ -710,7 +710,7 @@ function mockCommitSecond(baseTree) {
710
710
711
711
const m = nock ( "https://api.github.com" ) . post (
712
712
`/repos/${ owner } /${ repo } /git/commits` ,
713
- expectedBody
713
+ expectedBody ,
714
714
) ;
715
715
716
716
const body = {
@@ -728,7 +728,7 @@ function mockUpdateRef(branch) {
728
728
729
729
const m = nock ( "https://api.github.com" ) . patch (
730
730
`/repos/${ owner } /${ repo } /git/refs/heads%2F${ branch } ` ,
731
- expectedBody
731
+ expectedBody ,
732
732
) ;
733
733
734
734
m . reply ( 200 ) ;
@@ -743,7 +743,7 @@ function mockCreateRef(branch, sha) {
743
743
744
744
const m = nock ( "https://api.github.com" ) . post (
745
745
`/repos/${ owner } /${ repo } /git/refs` ,
746
- expectedBody
746
+ expectedBody ,
747
747
) ;
748
748
749
749
m . reply ( 200 ) ;
@@ -758,7 +758,7 @@ function mockCreateRefSecond(branch, sha) {
758
758
759
759
const m = nock ( "https://api.github.com" ) . post (
760
760
`/repos/${ owner } /${ repo } /git/refs` ,
761
- expectedBody
761
+ expectedBody ,
762
762
) ;
763
763
764
764
m . reply ( 200 ) ;
@@ -776,7 +776,7 @@ function mockGetRepo() {
776
776
777
777
function mockGetContents ( fileName , branch , success ) {
778
778
const m = nock ( "https://api.github.com" ) . head (
779
- `/repos/${ owner } /${ repo } /contents/${ fileName } ?ref=${ branch } `
779
+ `/repos/${ owner } /${ repo } /contents/${ fileName } ?ref=${ branch } ` ,
780
780
) ;
781
781
782
782
if ( success ) {
0 commit comments