@@ -40,16 +40,16 @@ function setupMswServer() {
4040const server = setupMswServer ( ) ;
4141
4242// Probot validates the privateKey locally
43- // So we must generate a valid key
43+ // so we must generate a valid key
4444const { privateKey } = generateKeyPairSync ( "rsa" , {
4545 modulusLength : 2048 ,
4646 privateKeyEncoding : {
47- format : "pem" ,
4847 type : "pkcs8" ,
48+ format : "pem" ,
4949 } ,
5050 publicKeyEncoding : {
51- format : "pem" ,
5251 type : "spki" ,
52+ format : "pem" ,
5353 } ,
5454} ) ;
5555
@@ -266,16 +266,16 @@ describe.concurrent("changeset-bot", () => {
266266 it ( "should update a comment when there is a comment" , async ( { expect, task } ) => {
267267 const probot = setupProbot ( task . id ) ;
268268 const { requests } = usePrState ( server , {
269+ files : {
270+ ...baseFiles ,
271+ ".changeset/something/changes.md" : [ { status : "added" } , "---\n---\n" ] ,
272+ } ,
269273 comments : [
270274 {
271275 id : 7 ,
272276 user : { login : "changeset-bot[bot]" } ,
273277 } ,
274278 ] ,
275- files : {
276- ...baseFiles ,
277- ".changeset/something/changes.md" : [ { status : "added" } , "---\n---\n" ] ,
278- } ,
279279 } ) ;
280280
281281 await probot . receive ( {
@@ -320,11 +320,11 @@ describe.concurrent("changeset-bot", () => {
320320 it ( "should show correct message if there is a changeset" , async ( { expect, task } ) => {
321321 const probot = setupProbot ( task . id ) ;
322322 const { requests } = usePrState ( server , {
323- comments : [ ] ,
324323 files : {
325324 ...baseFiles ,
326325 ".changeset/something/changes.md" : [ { status : "added" } , "---\n---\n" ] ,
327326 } ,
327+ comments : [ ] ,
328328 } ) ;
329329
330330 await probot . receive ( {
@@ -366,11 +366,11 @@ describe.concurrent("changeset-bot", () => {
366366 it ( "should show correct message if there is no changeset" , async ( { expect, task } ) => {
367367 const probot = setupProbot ( task . id ) ;
368368 const { requests } = usePrState ( server , {
369- comments : [ ] ,
370369 files : {
371370 ...baseFiles ,
372371 "index.js" : [ { status : "added" } , "console.log('test');" ] ,
373372 } ,
373+ comments : [ ] ,
374374 } ) ;
375375
376376 await probot . receive ( {
@@ -411,14 +411,14 @@ describe.concurrent("changeset-bot", () => {
411411 it ( "uses the root package when no workspace tool is detected" , async ( { expect, task } ) => {
412412 const probot = setupProbot ( task . id ) ;
413413 const { requests } = usePrState ( server , {
414- comments : [ ] ,
415414 files : {
416415 ".changeset/config.json" : JSON . stringify ( { } ) ,
417416 "package.json" : JSON . stringify ( {
418417 name : "root-package" ,
419418 } ) ,
420419 "src/index.ts" : [ { status : "added" } , "export {};" ] ,
421420 } ,
421+ comments : [ ] ,
422422 } ) ;
423423
424424 await probot . receive ( {
@@ -463,7 +463,6 @@ describe.concurrent("changeset-bot", () => {
463463 } ) => {
464464 const probot = setupProbot ( task . id ) ;
465465 const { requests } = usePrState ( server , {
466- comments : [ ] ,
467466 files : {
468467 ".changeset/config.json" : JSON . stringify ( { } ) ,
469468 "package.json" : JSON . stringify ( {
@@ -478,6 +477,7 @@ describe.concurrent("changeset-bot", () => {
478477 name : "pkg-b" ,
479478 } ) ,
480479 } ,
480+ comments : [ ] ,
481481 } ) ;
482482
483483 await probot . receive ( {
@@ -522,7 +522,6 @@ describe.concurrent("changeset-bot", () => {
522522 } ) => {
523523 const probot = setupProbot ( task . id ) ;
524524 const { requests } = usePrState ( server , {
525- comments : [ ] ,
526525 files : {
527526 ".changeset/config.json" : JSON . stringify ( { } ) ,
528527 "package.json" : JSON . stringify ( {
@@ -537,6 +536,7 @@ describe.concurrent("changeset-bot", () => {
537536 name : "pkg-ab" ,
538537 } ) ,
539538 } ,
539+ comments : [ ] ,
540540 } ) ;
541541
542542 await probot . receive ( {
@@ -578,7 +578,6 @@ describe.concurrent("changeset-bot", () => {
578578 it ( "detects pnpm workspaces when building the add-changeset link" , async ( { expect, task } ) => {
579579 const probot = setupProbot ( task . id ) ;
580580 const { requests } = usePrState ( server , {
581- comments : [ ] ,
582581 files : {
583582 ".changeset/config.json" : JSON . stringify ( { } ) ,
584583 "package.json" : JSON . stringify ( {
@@ -590,6 +589,7 @@ describe.concurrent("changeset-bot", () => {
590589 } ) ,
591590 "pnpm-workspace.yaml" : "packages:\n - packages/*\n" ,
592591 } ,
592+ comments : [ ] ,
593593 } ) ;
594594
595595 await probot . receive ( {
@@ -634,7 +634,6 @@ describe.concurrent("changeset-bot", () => {
634634 } ) => {
635635 const probot = setupProbot ( task . id ) ;
636636 const { requests } = usePrState ( server , {
637- comments : [ ] ,
638637 files : {
639638 ...baseFiles ,
640639 ".changeset/abc123.md" : [
@@ -653,6 +652,7 @@ add feature
653652 version : "1.0.0" ,
654653 } ) ,
655654 } ,
655+ comments : [ ] ,
656656 } ) ;
657657
658658 await probot . receive ( {
@@ -696,8 +696,8 @@ add feature
696696 it ( "shouldn't add a comment to a release pull request" , async ( { expect, task } ) => {
697697 const probot = setupProbot ( task . id ) ;
698698 const { requests } = usePrState ( server , {
699- comments : [ ] ,
700699 files : baseFiles ,
700+ comments : [ ] ,
701701 } ) ;
702702
703703 await probot . receive ( {
0 commit comments