Skip to content

Commit

Permalink
Update TC
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilbadyal committed Dec 10, 2024
1 parent 4796b61 commit d8b6604
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ jobs:
name: Checkout
uses: actions/checkout@v4

-
name: Run tests
- name: Run tests
run : |
yarn install
yarn test
Expand Down
3 changes: 1 addition & 2 deletions __test__/github_auth.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ describe('auth tests', () => {
await expect(() => getReleases(invalidOctokit, 'bs')).rejects.toThrowError()
})
it('failed on empty token', async () => {
await expect(() =>
getMyOctokit('', {
expect(() => getMyOctokit('', {
log: console
})
).toThrowError()
Expand Down
5 changes: 4 additions & 1 deletion __test__/github_fetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { parse } from 'dotenv'
import { beforeEach, describe, expect, it, jest } from '@jest/globals'
import fs from 'node:fs'
import { join } from 'node:path'
import { debug, info } from '@actions/core'
let octokit
const testTimeout = 30_000
jest.setTimeout(testTimeout)
Expand All @@ -16,6 +17,7 @@ describe('fetching test cases', () => {
key != 'GITHUB_RUN_ID' &&
key.startsWith('GITHUB_')
) {
debug(`Deleting env - ${key}`)
delete process.env[key]
}
}
Expand All @@ -25,7 +27,8 @@ describe('fetching test cases', () => {
for (const environment in repoEnvironment) {
process.env[environment] = repoEnvironment[environment]
}
octokit = getMyOctokit(process.env.GITHUB_TOKEN ?? '', {
// @ts-ignore
octokit = getMyOctokit(process.env.GITHUB_TOKEN, {
log: console
})
})
Expand Down

0 comments on commit d8b6604

Please sign in to comment.