Skip to content

Commit 52997ab

Browse files
committed
Fix missing coverage points
1 parent eab64c4 commit 52997ab

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

__tests__/stubs/github/internal/utils.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ describe('github/internal/utils', () => {
8080

8181
describe('getApiBaseUrl', () => {
8282
it('Returns the base URL', () => {
83+
delete process.env.GITHUB_API_URL
84+
8385
const result = utils.getApiBaseUrl()
8486

8587
expect(result).toBe('https://api.github.com')

src/stubs/core/core.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ export const CoreMeta: CoreMetadata = {
5454
secrets: [],
5555
state: {},
5656
stepDebug: process.env.ACTIONS_STEP_DEBUG === 'true',
57-
stepSummaryPath: process.env.GITHUB_STEP_SUMMARY ?? '',
57+
stepSummaryPath:
58+
/* istanbul ignore next*/ process.env.GITHUB_STEP_SUMMARY ?? '',
5859
colors: {
5960
cyan: (msg: string) => console.log(msg),
6061
blue: (msg: string) => console.log(msg),

src/stubs/github/context.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,11 @@ export class Context {
5353
this.runAttempt = parseInt(process.env.GITHUB_RUN_ATTEMPT as string, 10)
5454
this.runNumber = parseInt(process.env.GITHUB_RUN_NUMBER as string, 10)
5555
this.runId = parseInt(process.env.GITHUB_RUN_ID as string, 10)
56+
/* istanbul ignore next */
5657
this.apiUrl = process.env.GITHUB_API_URL ?? 'https://api.github.com'
58+
/* istanbul ignore next */
5759
this.serverUrl = process.env.GITHUB_SERVER_URL ?? 'https://github.com'
60+
/* istanbul ignore next */
5861
this.graphqlUrl =
5962
process.env.GITHUB_GRAPHQL_URL ?? 'https://api.github.com/graphql'
6063
}

0 commit comments

Comments
 (0)