1
0
Fork 0
mirror of https://code.forgejo.org/actions/cache.git synced 2025-05-10 19:19:54 +02:00

Add initial minimatch support

This commit is contained in:
Ethan Dennis 2020-03-05 09:15:35 -08:00
parent 84cead4a82
commit 1e233443e8
No known key found for this signature in database
GPG key ID: 32E74B75DB4065DD
14 changed files with 202 additions and 108 deletions

View file

@ -7,15 +7,17 @@ import run from "../src/restore";
import * as tar from "../src/tar";
import * as actionUtils from "../src/utils/actionUtils";
import * as testUtils from "../src/utils/testUtils";
// import * as pathUtils from "../src/utils/pathUtils";
jest.mock("../src/cacheHttpClient");
jest.mock("../src/tar");
jest.mock("../src/utils/actionUtils");
// jest.mock("../src/utils/pathUtils");
beforeAll(() => {
jest.spyOn(actionUtils, "resolvePath").mockImplementation(filePath => {
return path.resolve(filePath);
});
// jest.spyOn(pathUtils, "expandPaths").mockImplementation(filePaths => {
// return filePaths.map(x => path.resolve(x));
// });
jest.spyOn(actionUtils, "isExactKeyMatch").mockImplementation(
(key, cacheResult) => {