From 4d152182528e3e7e0c7448cfc8230dbe25907b3f Mon Sep 17 00:00:00 2001 From: Tingluo Huang Date: Thu, 19 Sep 2019 22:14:12 -0400 Subject: [PATCH] fix lint. --- packages/core/__tests__/lib.test.ts | 10 +++++----- packages/core/src/core.ts | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/core/__tests__/lib.test.ts b/packages/core/__tests__/lib.test.ts index 8124f596..316d653d 100644 --- a/packages/core/__tests__/lib.test.ts +++ b/packages/core/__tests__/lib.test.ts @@ -20,7 +20,7 @@ const testEnvVars = { INPUT_MULTIPLE_SPACES_VARIABLE: 'I have multiple spaces', // Save inputs - STATE_state_1: 'state_val' + STATE_TEST_1: 'state_val' } describe('@actions/core', () => { @@ -96,17 +96,17 @@ describe('@actions/core', () => { }) 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', () => { - expect(() => core.getInput('missing', { required: true })).toThrow( + expect(() => core.getInput('missing', { required: true})).toThrow( 'Input required and not supplied: missing' ) }) 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', () => { @@ -204,7 +204,7 @@ describe('@actions/core', () => { }) it('getState gets wrapper action state', () => { - expect(core.getState('state_1')).toBe('state_val') + expect(core.getState('TEST_1')).toBe('state_val') }) }) diff --git a/packages/core/src/core.ts b/packages/core/src/core.ts index 4bf44356..b1a7054a 100644 --- a/packages/core/src/core.ts +++ b/packages/core/src/core.ts @@ -1,4 +1,4 @@ -import { issue, issueCommand } from './command' +import { issue, issueCommand} from './command' import * as os from 'os' import * as path from 'path' @@ -37,7 +37,7 @@ export enum ExitCode { */ export function exportVariable(name: string, val: string): void { process.env[name] = val - issueCommand('set-env', { name }, val) + issueCommand('set-env', {name}, val) } /**