From b3eaa6839f78b94a42c28570b9cabd2e250847d9 Mon Sep 17 00:00:00 2001 From: John McBride Date: Mon, 18 Jul 2022 10:19:50 -0600 Subject: [PATCH] Removes empty lines with only spaces Signed-off-by: John McBride --- __tests__/cronJobTest/labelPr.test.ts | 6 +++--- __tests__/issueCommentTest/assign.test.ts | 1 - __tests__/issueCommentTest/reopen.test.ts | 2 +- __tests__/issueCommentTest/retitle.test.ts | 2 +- __tests__/label/area.test.ts | 4 ++-- __tests__/label/hold.test.ts | 4 ++-- __tests__/label/kind.test.ts | 4 ++-- __tests__/label/priority.test.ts | 4 ++-- __tests__/label/remove.test.ts | 7 +++---- __tests__/utils/labeling.test.ts | 2 +- 10 files changed, 17 insertions(+), 19 deletions(-) diff --git a/__tests__/cronJobTest/labelPr.test.ts b/__tests__/cronJobTest/labelPr.test.ts index 1b20792..bd04a08 100644 --- a/__tests__/cronJobTest/labelPr.test.ts +++ b/__tests__/cronJobTest/labelPr.test.ts @@ -23,7 +23,7 @@ describe('cronLabelPr', () => { // We can use any context here as "schedule" sends no webhook payload // Instead, we use it to gain the repo owner and url const context = new utils.mockContext(pullReqOpenedEvent) - + nock(utils.api) .get('/repos/Codertocat/Hello-World/pulls?page=1') .reply(200, listPullReqs) @@ -61,7 +61,7 @@ describe('cronLabelPr', () => { // We can use any context here as "schedule" sends no webhook payload // Instead, we use it to gain the repo owner and url const context = new utils.mockContext(pullReqOpenedEvent) - + nock(utils.api) .get('/repos/Codertocat/Hello-World/pulls?page=1') .reply(200, listPullReqs) @@ -92,4 +92,4 @@ describe('cronLabelPr', () => { }) expect(scope.isDone()).toBe(true) }) -}) \ No newline at end of file +}) diff --git a/__tests__/issueCommentTest/assign.test.ts b/__tests__/issueCommentTest/assign.test.ts index 7051624..9d477e4 100644 --- a/__tests__/issueCommentTest/assign.test.ts +++ b/__tests__/issueCommentTest/assign.test.ts @@ -9,7 +9,6 @@ import issueListComments from '../fixtures/issues/assign/issueListComments.json' nock.disableNetConnect() - describe('/assign', () => { beforeEach(() => { nock.cleanAll() diff --git a/__tests__/issueCommentTest/reopen.test.ts b/__tests__/issueCommentTest/reopen.test.ts index 97d8f40..e86ef7c 100644 --- a/__tests__/issueCommentTest/reopen.test.ts +++ b/__tests__/issueCommentTest/reopen.test.ts @@ -26,7 +26,7 @@ describe('/reopen', () => { return true }) .reply(200) - + const commentContext = new utils.mockContext(issueCommentEvent) await handleIssueComment(commentContext) diff --git a/__tests__/issueCommentTest/retitle.test.ts b/__tests__/issueCommentTest/retitle.test.ts index 70dcef1..460d3df 100644 --- a/__tests__/issueCommentTest/retitle.test.ts +++ b/__tests__/issueCommentTest/retitle.test.ts @@ -26,7 +26,7 @@ describe('/retitle', () => { return true }) .reply(200) - + const commentContext = new utils.mockContext(issueCommentEvent) await handleIssueComment(commentContext) diff --git a/__tests__/label/area.test.ts b/__tests__/label/area.test.ts index ed1a44f..e638031 100644 --- a/__tests__/label/area.test.ts +++ b/__tests__/label/area.test.ts @@ -25,7 +25,7 @@ describe('area', () => { return body }) .reply(200) - + nock(utils.api) .get('/repos/Codertocat/Hello-World/contents/.github/labels.yaml') .reply(200, labelFileContents) @@ -82,4 +82,4 @@ describe('area', () => { }) expect(scope.isDone()).toBe(true) }) -}) \ No newline at end of file +}) diff --git a/__tests__/label/hold.test.ts b/__tests__/label/hold.test.ts index aefb790..b226012 100644 --- a/__tests__/label/hold.test.ts +++ b/__tests__/label/hold.test.ts @@ -50,7 +50,7 @@ describe('hold', () => { nock(utils.api) .delete('/repos/Codertocat/Hello-World/issues/1/labels/hold') .reply(200) - + nock(utils.api) .get('/repos/Codertocat/Hello-World/issues/1') .reply(200, issuePayload) @@ -58,4 +58,4 @@ describe('hold', () => { await handleIssueComment(commentContext) expect(nock.isDone()).toBe(true) }) -}) \ No newline at end of file +}) diff --git a/__tests__/label/kind.test.ts b/__tests__/label/kind.test.ts index 3029f28..c442d37 100644 --- a/__tests__/label/kind.test.ts +++ b/__tests__/label/kind.test.ts @@ -25,7 +25,7 @@ describe('kind', () => { return body }) .reply(200) - + nock(utils.api) .get('/repos/Codertocat/Hello-World/contents/.github/labels.yaml') .reply(200, labelFileContents) @@ -82,4 +82,4 @@ describe('kind', () => { }) expect(scope.isDone()).toBe(true) }) -}) \ No newline at end of file +}) diff --git a/__tests__/label/priority.test.ts b/__tests__/label/priority.test.ts index d531b0c..3fb00d8 100644 --- a/__tests__/label/priority.test.ts +++ b/__tests__/label/priority.test.ts @@ -25,7 +25,7 @@ describe('priority', () => { return body }) .reply(200) - + nock(utils.api) .get('/repos/Codertocat/Hello-World/contents/.github/labels.yaml') .reply(200, labelFileContents) @@ -82,4 +82,4 @@ describe('priority', () => { }) expect(scope.isDone()).toBe(true) }) -}) \ No newline at end of file +}) diff --git a/__tests__/label/remove.test.ts b/__tests__/label/remove.test.ts index cfbfa18..0ffb41c 100644 --- a/__tests__/label/remove.test.ts +++ b/__tests__/label/remove.test.ts @@ -22,7 +22,7 @@ describe('remove', () => { nock(utils.api) .delete('/repos/Codertocat/Hello-World/issues/1/labels/some-label') .reply(200) - + nock(utils.api) .get('/repos/Codertocat/Hello-World/issues/1') .reply(200, issuePayload) @@ -46,7 +46,7 @@ describe('remove', () => { nock(utils.api) .delete('/repos/Codertocat/Hello-World/issues/1/labels/some-other-label') .reply(200) - + nock(utils.api) .get('/repos/Codertocat/Hello-World/issues/1') .reply(200, issuePayload) @@ -66,7 +66,7 @@ describe('remove', () => { nock(utils.api) .delete('/repos/Codertocat/Hello-World/issues/1/labels/some-label') .reply(200) - + nock(utils.api) .get('/repos/Codertocat/Hello-World/issues/1') .reply(200, issuePayload) @@ -75,7 +75,6 @@ describe('remove', () => { .get('/repos/Codertocat/Hello-World/collaborators/Codertocat') .reply(404) - const spy = jest.spyOn(core, 'setFailed') await handleIssueComment(commentContext) expect(spy).toHaveBeenCalled() diff --git a/__tests__/utils/labeling.test.ts b/__tests__/utils/labeling.test.ts index 2f889c8..e5a6024 100644 --- a/__tests__/utils/labeling.test.ts +++ b/__tests__/utils/labeling.test.ts @@ -49,7 +49,7 @@ describe('utils labeling', () => { issueCommentEvent.comment.body = '/area important' const commentContext = new utils.mockContext(issueCommentEvent) - + nock(utils.api) .get('/repos/Codertocat/Hello-World/contents/.github/labels.yml') .reply(200, malformedFileContents)