mirror of
https://github.com/actions/cache.git
synced 2025-05-19 07:16:31 +00:00
lint/format
This commit is contained in:
parent
6905c11681
commit
783accdc1c
@ -362,7 +362,6 @@ test("restore with cache found for key", async () => {
|
|||||||
expect(setOutputMock).toHaveBeenCalledWith("cache-primary-key", key);
|
expect(setOutputMock).toHaveBeenCalledWith("cache-primary-key", key);
|
||||||
expect(setOutputMock).toHaveBeenCalledWith("cache-matched-key", key);
|
expect(setOutputMock).toHaveBeenCalledWith("cache-matched-key", key);
|
||||||
|
|
||||||
|
|
||||||
expect(infoMock).toHaveBeenCalledWith(`Cache restored from key: ${key}`);
|
expect(infoMock).toHaveBeenCalledWith(`Cache restored from key: ${key}`);
|
||||||
expect(failedMock).toHaveBeenCalledTimes(0);
|
expect(failedMock).toHaveBeenCalledTimes(0);
|
||||||
});
|
});
|
||||||
|
@ -28,7 +28,10 @@ class StateProviderBase implements IStateProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class StateProvider extends StateProviderBase {
|
export class StateProvider extends StateProviderBase {
|
||||||
setState = (key: string, value: string) => { core.saveState(key, value); stateToOutput(key, value); };
|
setState = (key: string, value: string) => {
|
||||||
|
core.saveState(key, value);
|
||||||
|
stateToOutput(key, value);
|
||||||
|
};
|
||||||
getState = core.getState;
|
getState = core.getState;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -40,9 +43,7 @@ function stateToOutput(key: string, value: string) {
|
|||||||
core.setOutput(stateToOutputMap.get(key) as string, value);
|
core.setOutput(stateToOutputMap.get(key) as string, value);
|
||||||
}
|
}
|
||||||
export class NullStateProvider extends StateProviderBase {
|
export class NullStateProvider extends StateProviderBase {
|
||||||
|
|
||||||
setState = stateToOutput;
|
setState = stateToOutput;
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||||
getState = (key: string) => "";
|
getState = (key: string) => "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user