From 7a7ca58c85ed62bca087f54a171e0b39e7b5e16a Mon Sep 17 00:00:00 2001 From: pam- Date: Tue, 2 Mar 2021 08:41:57 -0500 Subject: [PATCH] fix: tests --- __tests__/utils.spec.js | 7 ++++--- fixtures.js | 4 ---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/__tests__/utils.spec.js b/__tests__/utils.spec.js index 12a199c5..b62086e7 100644 --- a/__tests__/utils.spec.js +++ b/__tests__/utils.spec.js @@ -1,5 +1,6 @@ import { formatChannelName, buildSlackAttachments } from '../src/utils'; import { GITHUB_PUSH_EVENT, GITHUB_PR_EVENT } from '../fixtures'; +const runId = parseInt(process.env.GITHUB_RUN_ID, 10); describe('Utils', () => { describe('formatChannelName', () => { @@ -35,7 +36,7 @@ describe('Utils', () => { expect(attachments[0].fields.find(a => a.title === 'Workflow')).toEqual({ title: 'Workflow', - value: ``, + value: ``, short: true, }); }); @@ -45,7 +46,7 @@ describe('Utils', () => { expect(attachments[0].fields.find(a => a.title === 'Job')).toEqual({ title: 'Job', - value: ``, + value: ``, short: true, }); }); @@ -77,7 +78,7 @@ describe('Utils', () => { expect(attachments[0].fields.find(a => a.title === 'Workflow')).toEqual({ title: 'Workflow', - value: ``, + value: ``, short: true, }); }); diff --git a/fixtures.js b/fixtures.js index e354611f..db97e326 100644 --- a/fixtures.js +++ b/fixtures.js @@ -14,8 +14,6 @@ export const GITHUB_PUSH_EVENT = { workflow: 'CI', eventName: 'push', sha: 'abc123', - job: 'build and push', - runId: 12345, }, }; @@ -35,7 +33,5 @@ export const GITHUB_PR_EVENT = { workflow: 'CI', eventName: 'pull_request', sha: 'abc123', - job: 'build and push', - runId: process.env.GITHUB_JOB, }, };