|
|
|
@ -107,18 +107,20 @@ describe('run', () => {
|
|
|
|
describe('Validate unchanged cache is not saved', () => {
|
|
|
|
describe('Validate unchanged cache is not saved', () => {
|
|
|
|
it('should not save cache for yarn1', async () => {
|
|
|
|
it('should not save cache for yarn1', async () => {
|
|
|
|
inputs['cache'] = 'yarn';
|
|
|
|
inputs['cache'] = 'yarn';
|
|
|
|
getStateSpy.mockImplementation(() => yarnFileHash);
|
|
|
|
getStateSpy.mockImplementation(key =>
|
|
|
|
getCommandOutputSpy
|
|
|
|
key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
|
|
|
.mockImplementationOnce(() => '1.2.3')
|
|
|
|
? yarnFileHash
|
|
|
|
.mockImplementationOnce(() => `${commonPath}/yarn1`);
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
|
|
|
: 'not expected'
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
await run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith(`yarn path is ${commonPath}/yarn1`);
|
|
|
|
expect(debugSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith('Consumed yarn version is 1.2.3');
|
|
|
|
|
|
|
|
expect(infoSpy).toHaveBeenCalledWith(
|
|
|
|
expect(infoSpy).toHaveBeenCalledWith(
|
|
|
|
`Cache hit occurred on the primary key ${yarnFileHash}, not saving cache.`
|
|
|
|
`Cache hit occurred on the primary key ${yarnFileHash}, not saving cache.`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -127,18 +129,20 @@ describe('run', () => {
|
|
|
|
|
|
|
|
|
|
|
|
it('should not save cache for yarn2', async () => {
|
|
|
|
it('should not save cache for yarn2', async () => {
|
|
|
|
inputs['cache'] = 'yarn';
|
|
|
|
inputs['cache'] = 'yarn';
|
|
|
|
getStateSpy.mockImplementation(() => yarnFileHash);
|
|
|
|
getStateSpy.mockImplementation(key =>
|
|
|
|
getCommandOutputSpy
|
|
|
|
key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
|
|
|
.mockImplementationOnce(() => '2.2.3')
|
|
|
|
? yarnFileHash
|
|
|
|
.mockImplementationOnce(() => `${commonPath}/yarn2`);
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
|
|
|
: 'not expected'
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
await run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith(`yarn path is ${commonPath}/yarn2`);
|
|
|
|
expect(debugSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith('Consumed yarn version is 2.2.3');
|
|
|
|
|
|
|
|
expect(infoSpy).toHaveBeenCalledWith(
|
|
|
|
expect(infoSpy).toHaveBeenCalledWith(
|
|
|
|
`Cache hit occurred on the primary key ${yarnFileHash}, not saving cache.`
|
|
|
|
`Cache hit occurred on the primary key ${yarnFileHash}, not saving cache.`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -147,35 +151,40 @@ describe('run', () => {
|
|
|
|
|
|
|
|
|
|
|
|
it('should not save cache for npm', async () => {
|
|
|
|
it('should not save cache for npm', async () => {
|
|
|
|
inputs['cache'] = 'npm';
|
|
|
|
inputs['cache'] = 'npm';
|
|
|
|
getStateSpy.mockImplementation(() => npmFileHash);
|
|
|
|
getStateSpy.mockImplementation(key =>
|
|
|
|
|
|
|
|
key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
|
|
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
|
|
|
: 'not expected'
|
|
|
|
|
|
|
|
);
|
|
|
|
getCommandOutputSpy.mockImplementationOnce(() => `${commonPath}/npm`);
|
|
|
|
getCommandOutputSpy.mockImplementationOnce(() => `${commonPath}/npm`);
|
|
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
await run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(1);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith(`npm path is ${commonPath}/npm`);
|
|
|
|
expect(debugSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(infoSpy).toHaveBeenCalledWith(
|
|
|
|
|
|
|
|
`Cache hit occurred on the primary key ${npmFileHash}, not saving cache.`
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
expect(setFailedSpy).not.toHaveBeenCalled();
|
|
|
|
expect(setFailedSpy).not.toHaveBeenCalled();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
it('should not save cache for pnpm', async () => {
|
|
|
|
it('should not save cache for pnpm', async () => {
|
|
|
|
inputs['cache'] = 'pnpm';
|
|
|
|
inputs['cache'] = 'pnpm';
|
|
|
|
getStateSpy.mockImplementation(() => pnpmFileHash);
|
|
|
|
getStateSpy.mockImplementation(key =>
|
|
|
|
getCommandOutputSpy.mockImplementationOnce(() => `${commonPath}/pnpm`);
|
|
|
|
key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
|
|
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
|
|
|
: 'not expected'
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
await run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(1);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith(`pnpm path is ${commonPath}/pnpm`);
|
|
|
|
expect(debugSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(infoSpy).toHaveBeenCalledWith(
|
|
|
|
|
|
|
|
`Cache hit occurred on the primary key ${pnpmFileHash}, not saving cache.`
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
expect(setFailedSpy).not.toHaveBeenCalled();
|
|
|
|
expect(setFailedSpy).not.toHaveBeenCalled();
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -183,24 +192,22 @@ describe('run', () => {
|
|
|
|
describe('action saves the cache', () => {
|
|
|
|
describe('action saves the cache', () => {
|
|
|
|
it('saves cache from yarn 1', async () => {
|
|
|
|
it('saves cache from yarn 1', async () => {
|
|
|
|
inputs['cache'] = 'yarn';
|
|
|
|
inputs['cache'] = 'yarn';
|
|
|
|
getStateSpy.mockImplementation((name: string) => {
|
|
|
|
getStateSpy.mockImplementation((key: string) =>
|
|
|
|
if (name === State.CacheMatchedKey) {
|
|
|
|
key === State.CacheMatchedKey
|
|
|
|
return yarnFileHash;
|
|
|
|
? yarnFileHash
|
|
|
|
} else {
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
return npmFileHash;
|
|
|
|
? npmFileHash
|
|
|
|
}
|
|
|
|
: key === State.CachePaths
|
|
|
|
});
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
getCommandOutputSpy
|
|
|
|
: 'not expected'
|
|
|
|
.mockImplementationOnce(() => '1.2.3')
|
|
|
|
);
|
|
|
|
.mockImplementationOnce(() => `${commonPath}/yarn1`);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
await run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith(`yarn path is ${commonPath}/yarn1`);
|
|
|
|
expect(debugSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith('Consumed yarn version is 1.2.3');
|
|
|
|
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
`Cache hit occurred on the primary key ${yarnFileHash}, not saving cache.`
|
|
|
|
`Cache hit occurred on the primary key ${yarnFileHash}, not saving cache.`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -213,24 +220,22 @@ describe('run', () => {
|
|
|
|
|
|
|
|
|
|
|
|
it('saves cache from yarn 2', async () => {
|
|
|
|
it('saves cache from yarn 2', async () => {
|
|
|
|
inputs['cache'] = 'yarn';
|
|
|
|
inputs['cache'] = 'yarn';
|
|
|
|
getStateSpy.mockImplementation((name: string) => {
|
|
|
|
getStateSpy.mockImplementation((key: string) =>
|
|
|
|
if (name === State.CacheMatchedKey) {
|
|
|
|
key === State.CacheMatchedKey
|
|
|
|
return yarnFileHash;
|
|
|
|
? yarnFileHash
|
|
|
|
} else {
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
return npmFileHash;
|
|
|
|
? npmFileHash
|
|
|
|
}
|
|
|
|
: key === State.CachePaths
|
|
|
|
});
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
getCommandOutputSpy
|
|
|
|
: 'not expected'
|
|
|
|
.mockImplementationOnce(() => '2.2.3')
|
|
|
|
);
|
|
|
|
.mockImplementationOnce(() => `${commonPath}/yarn2`);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
await run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith(`yarn path is ${commonPath}/yarn2`);
|
|
|
|
expect(debugSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith('Consumed yarn version is 2.2.3');
|
|
|
|
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
`Cache hit occurred on the primary key ${yarnFileHash}, not saving cache.`
|
|
|
|
`Cache hit occurred on the primary key ${yarnFileHash}, not saving cache.`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -243,21 +248,22 @@ describe('run', () => {
|
|
|
|
|
|
|
|
|
|
|
|
it('saves cache from npm', async () => {
|
|
|
|
it('saves cache from npm', async () => {
|
|
|
|
inputs['cache'] = 'npm';
|
|
|
|
inputs['cache'] = 'npm';
|
|
|
|
getStateSpy.mockImplementation((name: string) => {
|
|
|
|
getStateSpy.mockImplementation((key: string) =>
|
|
|
|
if (name === State.CacheMatchedKey) {
|
|
|
|
key === State.CacheMatchedKey
|
|
|
|
return npmFileHash;
|
|
|
|
? npmFileHash
|
|
|
|
} else {
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
return yarnFileHash;
|
|
|
|
? yarnFileHash
|
|
|
|
}
|
|
|
|
: key === State.CachePaths
|
|
|
|
});
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
getCommandOutputSpy.mockImplementationOnce(() => `${commonPath}/npm`);
|
|
|
|
: 'not expected'
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
await run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(1);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith(`npm path is ${commonPath}/npm`);
|
|
|
|
expect(debugSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
`Cache hit occurred on the primary key ${npmFileHash}, not saving cache.`
|
|
|
|
`Cache hit occurred on the primary key ${npmFileHash}, not saving cache.`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -270,21 +276,22 @@ describe('run', () => {
|
|
|
|
|
|
|
|
|
|
|
|
it('saves cache from pnpm', async () => {
|
|
|
|
it('saves cache from pnpm', async () => {
|
|
|
|
inputs['cache'] = 'pnpm';
|
|
|
|
inputs['cache'] = 'pnpm';
|
|
|
|
getStateSpy.mockImplementation((name: string) => {
|
|
|
|
getStateSpy.mockImplementation((key: string) =>
|
|
|
|
if (name === State.CacheMatchedKey) {
|
|
|
|
key === State.CacheMatchedKey
|
|
|
|
return pnpmFileHash;
|
|
|
|
? pnpmFileHash
|
|
|
|
} else {
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
return npmFileHash;
|
|
|
|
? npmFileHash
|
|
|
|
}
|
|
|
|
: key === State.CachePaths
|
|
|
|
});
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
getCommandOutputSpy.mockImplementationOnce(() => `${commonPath}/pnpm`);
|
|
|
|
: 'not expected'
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
await run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(1);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith(`pnpm path is ${commonPath}/pnpm`);
|
|
|
|
expect(debugSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
`Cache hit occurred on the primary key ${pnpmFileHash}, not saving cache.`
|
|
|
|
`Cache hit occurred on the primary key ${pnpmFileHash}, not saving cache.`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -297,14 +304,15 @@ describe('run', () => {
|
|
|
|
|
|
|
|
|
|
|
|
it('save with -1 cacheId , should not fail workflow', async () => {
|
|
|
|
it('save with -1 cacheId , should not fail workflow', async () => {
|
|
|
|
inputs['cache'] = 'npm';
|
|
|
|
inputs['cache'] = 'npm';
|
|
|
|
getStateSpy.mockImplementation((name: string) => {
|
|
|
|
getStateSpy.mockImplementation((key: string) =>
|
|
|
|
if (name === State.CacheMatchedKey) {
|
|
|
|
key === State.CacheMatchedKey
|
|
|
|
return npmFileHash;
|
|
|
|
? npmFileHash
|
|
|
|
} else {
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
return yarnFileHash;
|
|
|
|
? yarnFileHash
|
|
|
|
}
|
|
|
|
: key === State.CachePaths
|
|
|
|
});
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
getCommandOutputSpy.mockImplementationOnce(() => `${commonPath}/npm`);
|
|
|
|
: 'not expected'
|
|
|
|
|
|
|
|
);
|
|
|
|
saveCacheSpy.mockImplementation(() => {
|
|
|
|
saveCacheSpy.mockImplementation(() => {
|
|
|
|
return -1;
|
|
|
|
return -1;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -312,9 +320,9 @@ describe('run', () => {
|
|
|
|
await run();
|
|
|
|
await run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(1);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith(`npm path is ${commonPath}/npm`);
|
|
|
|
expect(debugSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
`Cache hit occurred on the primary key ${npmFileHash}, not saving cache.`
|
|
|
|
`Cache hit occurred on the primary key ${npmFileHash}, not saving cache.`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
@ -327,14 +335,15 @@ describe('run', () => {
|
|
|
|
|
|
|
|
|
|
|
|
it('saves with error from toolkit, should fail workflow', async () => {
|
|
|
|
it('saves with error from toolkit, should fail workflow', async () => {
|
|
|
|
inputs['cache'] = 'npm';
|
|
|
|
inputs['cache'] = 'npm';
|
|
|
|
getStateSpy.mockImplementation((name: string) => {
|
|
|
|
getStateSpy.mockImplementation((key: string) =>
|
|
|
|
if (name === State.CacheMatchedKey) {
|
|
|
|
key === State.CacheMatchedKey
|
|
|
|
return npmFileHash;
|
|
|
|
? npmFileHash
|
|
|
|
} else {
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
return yarnFileHash;
|
|
|
|
? yarnFileHash
|
|
|
|
}
|
|
|
|
: key === State.CachePaths
|
|
|
|
});
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
getCommandOutputSpy.mockImplementationOnce(() => `${commonPath}/npm`);
|
|
|
|
: 'not expected'
|
|
|
|
|
|
|
|
);
|
|
|
|
saveCacheSpy.mockImplementation(() => {
|
|
|
|
saveCacheSpy.mockImplementation(() => {
|
|
|
|
throw new cache.ValidationError('Validation failed');
|
|
|
|
throw new cache.ValidationError('Validation failed');
|
|
|
|
});
|
|
|
|
});
|
|
|
|
@ -342,9 +351,9 @@ describe('run', () => {
|
|
|
|
await run();
|
|
|
|
await run();
|
|
|
|
|
|
|
|
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getInputSpy).toHaveBeenCalled();
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(2);
|
|
|
|
expect(getStateSpy).toHaveBeenCalledTimes(3);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(1);
|
|
|
|
expect(getCommandOutputSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(debugSpy).toHaveBeenCalledWith(`npm path is ${commonPath}/npm`);
|
|
|
|
expect(debugSpy).toHaveBeenCalledTimes(0);
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
expect(infoSpy).not.toHaveBeenCalledWith(
|
|
|
|
`Cache hit occurred on the primary key ${npmFileHash}, not saving cache.`
|
|
|
|
`Cache hit occurred on the primary key ${npmFileHash}, not saving cache.`
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|