Update actions/exec

This commit is contained in:
Jill Regan
2026-02-26 08:14:16 -05:00
parent a312828d43
commit d688c27248
8 changed files with 24 additions and 53 deletions

View File

@@ -0,0 +1,5 @@
module.exports = {
getExecOutput: jest.fn(() => ({
stdout: "MOCK_SECRET",
})),
};

View File

@@ -1,7 +0,0 @@
module.exports = {
downloadTool: jest.fn(),
extractTar: jest.fn(),
extractZip: jest.fn(),
cacheDir: jest.fn((dir) => Promise.resolve(dir)),
find: jest.fn(() => ""),
};

View File

@@ -0,0 +1,10 @@
module.exports = {
downloadTool: jest.fn(),
extractTar: jest.fn(),
extractZip: jest.fn(),
cacheDir: jest.fn<Promise<string>, [string]>(async (dir) => {
await Promise.resolve();
return dir;
}),
find: jest.fn<string, [string, string?, string?]>(() => ""),
};

View File

@@ -15,12 +15,6 @@ import {
envServiceAccountToken,
} from "./constants";
jest.mock("@actions/core");
jest.mock("@actions/exec", () => ({
getExecOutput: jest.fn(() => ({
stdout: "MOCK_SECRET",
})),
}));
jest.mock("@1password/op-js");
beforeEach(() => {