Skip to content

Commit e39b386

Browse files
committed
Fix test mock return order
1 parent b692820 commit e39b386

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ Create a workflow `.yml` file in your repository's `.github/workflows` directory
8383

8484
If you are using this inside a container, a POSIX-compliant `tar` needs to be included and accessible from the execution path.
8585

86-
Note: `actions/cache@v6` runs on Node.js 24 and requires a minimum Actions Runner version of `2.327.1`.
86+
Note: `actions/cache@v5` runs on Node.js 24 and requires a minimum Actions Runner version of `2.327.1`.
8787

8888
If you are using a `self-hosted` Windows runner, `GNU tar` and `zstd` are required for [Cross-OS caching](https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cross-os-cache) to work. They are also recommended to be installed in general so the performance is on par with `hosted` Windows runners.
8989

__tests__/saveImpl.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ test("save with large cache outputs warning", async () => {
184184
const savedCacheKey = "Linux-node-";
185185

186186
(core.getState as jest.Mock)
187-
.mockReturnValueOnce(savedCacheKey)
188-
.mockReturnValueOnce(primaryKey);
187+
.mockReturnValueOnce(primaryKey)
188+
.mockReturnValueOnce(savedCacheKey);
189189

190190
const inputPath = "node_modules";
191191
testUtils.setInput(Inputs.Path, inputPath);
@@ -210,8 +210,8 @@ test("save with reserve cache failure outputs warning", async () => {
210210
const savedCacheKey = "Linux-node-";
211211

212212
(core.getState as jest.Mock)
213-
.mockReturnValueOnce(savedCacheKey)
214-
.mockReturnValueOnce(primaryKey);
213+
.mockReturnValueOnce(primaryKey)
214+
.mockReturnValueOnce(savedCacheKey);
215215

216216
const inputPath = "node_modules";
217217
testUtils.setInput(Inputs.Path, inputPath);
@@ -236,8 +236,8 @@ test("save with server error outputs warning", async () => {
236236
const savedCacheKey = "Linux-node-";
237237

238238
(core.getState as jest.Mock)
239-
.mockReturnValueOnce(savedCacheKey)
240-
.mockReturnValueOnce(primaryKey);
239+
.mockReturnValueOnce(primaryKey)
240+
.mockReturnValueOnce(savedCacheKey);
241241

242242
const inputPath = "node_modules";
243243
testUtils.setInput(Inputs.Path, inputPath);

0 commit comments

Comments
 (0)