Commit e39b386c authored by Joshua Brooks's avatar Joshua Brooks
Browse files

Fix test mock return order

parent b6928203
Loading
Loading
Loading
Loading
+1 −1
Changes for README.md: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -83,7 +83,7 @@ Create a workflow `.yml` file in your repository's `.github/workflows` directory

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

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

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.

+6 −6
Changes for __tests__/saveImpl.test.ts: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -184,8 +184,8 @@ test("save with large cache outputs warning", async () => {
    const savedCacheKey = "Linux-node-";

    (core.getState as jest.Mock)
        .mockReturnValueOnce(savedCacheKey)
        .mockReturnValueOnce(primaryKey);
        .mockReturnValueOnce(primaryKey)
        .mockReturnValueOnce(savedCacheKey);

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

    (core.getState as jest.Mock)
        .mockReturnValueOnce(savedCacheKey)
        .mockReturnValueOnce(primaryKey);
        .mockReturnValueOnce(primaryKey)
        .mockReturnValueOnce(savedCacheKey);

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

    (core.getState as jest.Mock)
        .mockReturnValueOnce(savedCacheKey)
        .mockReturnValueOnce(primaryKey);
        .mockReturnValueOnce(primaryKey)
        .mockReturnValueOnce(savedCacheKey);

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