mirror of
https://github.com/MillironX/setup-nextflow.git
synced 2024-11-21 17:36:04 +00:00
chore: Clean up typing in tests
This commit is contained in:
parent
c3424c52c4
commit
7c79f790e0
2 changed files with 12 additions and 6 deletions
|
@ -1,15 +1,18 @@
|
||||||
import * as functions from '../src/functions'
|
import * as functions from '../src/functions'
|
||||||
import {getToken} from './utils'
|
import {getToken} from './utils'
|
||||||
import * as github from '@actions/github'
|
import * as github from '@actions/github'
|
||||||
|
import {GitHub} from '@actions/github/lib/utils'
|
||||||
import anyTest, {TestFn} from 'ava' // eslint-disable-line import/no-unresolved
|
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<typeof GitHub>
|
||||||
|
}>
|
||||||
|
|
||||||
test.before(t => {
|
test.before(t => {
|
||||||
const first = true
|
const first = true
|
||||||
const current_token = getToken(first)
|
const current_token = getToken(first)
|
||||||
t.context = {token: current_token}
|
t.context = {token: current_token, octokit: github.getOctokit(current_token)}
|
||||||
t.context = {octokit: github.getOctokit(current_token)}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
test('all_nf_releases', async t => {
|
test('all_nf_releases', async t => {
|
||||||
|
|
|
@ -1,15 +1,18 @@
|
||||||
import * as github from '@actions/github'
|
import * as github from '@actions/github'
|
||||||
import {release_data} from '../src/functions'
|
import {release_data} from '../src/functions'
|
||||||
import {getToken} from './utils'
|
import {getToken} from './utils'
|
||||||
|
import {GitHub} from '@actions/github/lib/utils'
|
||||||
import anyTest, {TestFn} from 'ava' // eslint-disable-line import/no-unresolved
|
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<typeof GitHub>
|
||||||
|
}>
|
||||||
|
|
||||||
test.before(t => {
|
test.before(t => {
|
||||||
const first = true
|
const first = true
|
||||||
const current_token = getToken(first)
|
const current_token = getToken(first)
|
||||||
t.context = {token: current_token}
|
t.context = {token: current_token, octokit: github.getOctokit(current_token)}
|
||||||
t.context = {octokit: github.getOctokit(current_token)}
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const macro = test.macro(async (t, version: string, expected: string) => {
|
const macro = test.macro(async (t, version: string, expected: string) => {
|
||||||
|
|
Loading…
Reference in a new issue