Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
danadajian committed Oct 7, 2024
1 parent c1041d6 commit a012310
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/utils/get-action-inputs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -26,8 +28,6 @@ jest.mock('fs', () => ({
}))
}));

(getInput as jest.Mock).mockImplementation(input => (input === 'input2' ? '' : input));

describe('getActionInputs', () => {
const requiredInputs = ['input1'];

Expand Down

0 comments on commit a012310

Please sign in to comment.