Add mocks to tests

This commit is contained in:
Nick Cipollo
2019-08-26 20:35:39 -04:00
parent 4e291a9639
commit 028c2af361
7 changed files with 137 additions and 36 deletions

View File

@@ -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)