diff --git a/test/utils/get-action-inputs.test.ts b/test/utils/get-action-inputs.test.ts index fda6bd84..21d8fbaf 100644 --- a/test/utils/get-action-inputs.test.ts +++ b/test/utils/get-action-inputs.test.ts @@ -16,7 +16,9 @@ import { getInput } from '@actions/core'; import { getInputsFromFile } from '../../src/utils/get-inputs-from-file'; jest.mock('../../src/utils/get-inputs-from-file'); -jest.mock('@actions/core'); +jest.mock('@actions/core', () => ({ + getInput: jest.fn(input => (input === 'input2' ? '' : input)) +})); jest.mock('fs', () => ({ promises: { access: jest.fn() @@ -26,8 +28,6 @@ jest.mock('fs', () => ({ })) })); -(getInput as jest.Mock).mockImplementation(input => (input === 'input2' ? '' : input)); - describe('getActionInputs', () => { const requiredInputs = ['input1'];