5
0
Fork 0
mirror of https://github.com/hashicorp/vault-action.git synced 2025-11-07 15:16:56 +00:00

Add additional mocks needed for tests in new versions of @actions (#343)

Tests started failing after @actions was bumped in
https://github.com/hashicorp/vault-action/pull/334
This commit is contained in:
Christopher Swenson 2022-06-28 14:35:22 -07:00 committed by GitHub
parent d2b5111993
commit 2dcbd17a34
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,12 @@
jest.mock('got');
jest.mock('@actions/core');
jest.mock('@actions/core/lib/command');
jest.mock("fs")
jest.mock('fs', () => ({
stat: jest.fn().mockResolvedValue(null),
promises: {
access: jest.fn().mockResolvedValue(null),
}
}));
const core = require('@actions/core');
const got = require('got');