Add mocks to tests
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import * as github from '@actions/github';
|
||||
import * as core from '@actions/core';
|
||||
import { Inputs } from './Inputs';
|
||||
import { Releases } from './Releases';
|
||||
import { Inputs, CoreInputs } from './Inputs';
|
||||
import { Releases, GithubReleases } from './Releases';
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
const token = core.getInput('token');
|
||||
const context = github.context
|
||||
const git = new github.GitHub(token);
|
||||
const releases = new Releases(context, git)
|
||||
const inputs = new Inputs(context)
|
||||
const releases = new GithubReleases(context, git)
|
||||
const inputs = new CoreInputs(context)
|
||||
await releases.create(inputs.tag)
|
||||
.catch(error => {
|
||||
core.warning(error)
|
||||
|
||||
Reference in New Issue
Block a user