diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5b82964..818c17e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -19,8 +19,7 @@ jobs: name: Checkout uses: actions/checkout@v4 - - - name: Run tests + - name: Run tests run : | yarn install yarn test diff --git a/__test__/github_auth.test.ts b/__test__/github_auth.test.ts index ff6abc1..ea2f5b4 100644 --- a/__test__/github_auth.test.ts +++ b/__test__/github_auth.test.ts @@ -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() diff --git a/__test__/github_fetch.test.ts b/__test__/github_fetch.test.ts index cdfe164..66e28b8 100644 --- a/__test__/github_fetch.test.ts +++ b/__test__/github_fetch.test.ts @@ -16,6 +16,7 @@ describe('fetching test cases', () => { key != 'GITHUB_RUN_ID' && key.startsWith('GITHUB_') ) { + console.log(key) delete process.env[key] } } @@ -25,7 +26,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 }) })