|
|
|
@ -86,7 +86,8 @@ test("restore with no cache found", async () => {
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
|
|
|
|
|
expect(outputMock).toHaveBeenCalledTimes(1);
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-path", path);
|
|
|
|
|
expect(outputMock).toHaveBeenCalledTimes(2);
|
|
|
|
|
expect(failedMock).toHaveBeenCalledTimes(0);
|
|
|
|
|
|
|
|
|
|
expect(infoMock).toHaveBeenCalledWith(
|
|
|
|
@ -128,6 +129,7 @@ test("restore with restore keys and no cache found", async () => {
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-path", path);
|
|
|
|
|
expect(failedMock).toHaveBeenCalledTimes(0);
|
|
|
|
|
|
|
|
|
|
expect(infoMock).toHaveBeenCalledWith(
|
|
|
|
@ -169,8 +171,9 @@ test("restore with cache found for key", async () => {
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-hit", "true");
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-matched-key", key);
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-path", path);
|
|
|
|
|
|
|
|
|
|
expect(outputMock).toHaveBeenCalledTimes(3);
|
|
|
|
|
expect(outputMock).toHaveBeenCalledTimes(4);
|
|
|
|
|
|
|
|
|
|
expect(infoMock).toHaveBeenCalledWith(`Cache restored from key: ${key}`);
|
|
|
|
|
expect(failedMock).toHaveBeenCalledTimes(0);
|
|
|
|
@ -212,8 +215,9 @@ test("restore with cache found for restore key", async () => {
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-primary-key", key);
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-hit", "false");
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-matched-key", restoreKey);
|
|
|
|
|
expect(outputMock).toHaveBeenCalledWith("cache-path", path);
|
|
|
|
|
|
|
|
|
|
expect(outputMock).toHaveBeenCalledTimes(3);
|
|
|
|
|
expect(outputMock).toHaveBeenCalledTimes(4);
|
|
|
|
|
|
|
|
|
|
expect(infoMock).toHaveBeenCalledWith(
|
|
|
|
|
`Cache restored from key: ${restoreKey}`
|
|
|
|
|