1
0
Fork 0

fix lint.

pull/149/head
Tingluo Huang 2019-09-19 22:18:51 -04:00
parent 4d15218252
commit 81b71dc6e6
2 changed files with 6 additions and 6 deletions

View File

@ -96,17 +96,17 @@ describe('@actions/core', () => {
}) })
it('getInput gets required input', () => { it('getInput gets required input', () => {
expect(core.getInput('my input', { required: true})).toBe('val') expect(core.getInput('my input', {required: true})).toBe('val')
}) })
it('getInput throws on missing required input', () => { it('getInput throws on missing required input', () => {
expect(() => core.getInput('missing', { required: true})).toThrow( expect(() => core.getInput('missing', {required: true})).toThrow(
'Input required and not supplied: missing' 'Input required and not supplied: missing'
) )
}) })
it('getInput does not throw on missing non-required input', () => { it('getInput does not throw on missing non-required input', () => {
expect(core.getInput('missing', { required: false})).toBe('') expect(core.getInput('missing', {required: false})).toBe('')
}) })
it('getInput is case insensitive', () => { it('getInput is case insensitive', () => {

View File

@ -1,4 +1,4 @@
import { issue, issueCommand} from './command' import {issue, issueCommand} from './command'
import * as os from 'os' import * as os from 'os'
import * as path from 'path' import * as path from 'path'
@ -86,7 +86,7 @@ export function getInput(name: string, options?: InputOptions): string {
* @param value value to store * @param value value to store
*/ */
export function setOutput(name: string, value: string): void { export function setOutput(name: string, value: string): void {
issueCommand('set-output', { name }, value) issueCommand('set-output', {name}, value)
} }
//----------------------------------------------------------------------- //-----------------------------------------------------------------------
@ -190,7 +190,7 @@ export async function group<T>(name: string, fn: () => Promise<T>): Promise<T> {
* @param value value to store * @param value value to store
*/ */
export function saveState(name: string, value: string): void { export function saveState(name: string, value: string): void {
issueCommand('save-state', { name }, value) issueCommand('save-state', {name}, value)
} }
/** /**