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:
committed by
GitHub
parent
d2b5111993
commit
2dcbd17a34
@@ -1,7 +1,12 @@
|
|||||||
jest.mock('got');
|
jest.mock('got');
|
||||||
jest.mock('@actions/core');
|
jest.mock('@actions/core');
|
||||||
jest.mock('@actions/core/lib/command');
|
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 core = require('@actions/core');
|
||||||
const got = require('got');
|
const got = require('got');
|
||||||
|
|||||||
Reference in New Issue
Block a user