diff --git a/test/functions.ts b/test/functions.ts index ab547b9..c0da4ff 100644 --- a/test/functions.ts +++ b/test/functions.ts @@ -1,15 +1,18 @@ import * as functions from '../src/functions' import {getToken} from './utils' import * as github from '@actions/github' +import {GitHub} from '@actions/github/lib/utils' import anyTest, {TestFn} from 'ava' // eslint-disable-line import/no-unresolved -const test = anyTest as TestFn<{foo: string}> +const test = anyTest as TestFn<{ + token: string + octokit: InstanceType +}> test.before(t => { const first = true const current_token = getToken(first) - t.context = {token: current_token} - t.context = {octokit: github.getOctokit(current_token)} + t.context = {token: current_token, octokit: github.getOctokit(current_token)} }) test('all_nf_releases', async t => { diff --git a/test/releasedata.ts b/test/releasedata.ts index 7bbbff5..10e0a28 100644 --- a/test/releasedata.ts +++ b/test/releasedata.ts @@ -1,15 +1,18 @@ import * as github from '@actions/github' import {release_data} from '../src/functions' import {getToken} from './utils' +import {GitHub} from '@actions/github/lib/utils' import anyTest, {TestFn} from 'ava' // eslint-disable-line import/no-unresolved -const test = anyTest as TestFn<{foo: string}> +const test = anyTest as TestFn<{ + token: string + octokit: InstanceType +}> test.before(t => { const first = true const current_token = getToken(first) - t.context = {token: current_token} - t.context = {octokit: github.getOctokit(current_token)} + t.context = {token: current_token, octokit: github.getOctokit(current_token)} }) const macro = test.macro(async (t, version: string, expected: string) => {