|
|
|
@ -114,10 +114,10 @@ describe('run', () => {
|
|
|
|
|
key === State.CachePackageManager
|
|
|
|
|
? inputs['cache']
|
|
|
|
|
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
@ -138,10 +138,10 @@ describe('run', () => {
|
|
|
|
|
key === State.CachePackageManager
|
|
|
|
|
? inputs['cache']
|
|
|
|
|
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
@ -162,10 +162,10 @@ describe('run', () => {
|
|
|
|
|
key === State.CachePackageManager
|
|
|
|
|
? inputs['cache']
|
|
|
|
|
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
);
|
|
|
|
|
getCommandOutputSpy.mockImplementationOnce(() => `${commonPath}/npm`);
|
|
|
|
|
|
|
|
|
@ -184,10 +184,10 @@ describe('run', () => {
|
|
|
|
|
key === State.CachePackageManager
|
|
|
|
|
? inputs['cache']
|
|
|
|
|
: key === State.CachePrimaryKey || key === State.CacheMatchedKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
@ -207,12 +207,12 @@ describe('run', () => {
|
|
|
|
|
key === State.CachePackageManager
|
|
|
|
|
? inputs['cache']
|
|
|
|
|
: key === State.CacheMatchedKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
@ -237,12 +237,12 @@ describe('run', () => {
|
|
|
|
|
key === State.CachePackageManager
|
|
|
|
|
? inputs['cache']
|
|
|
|
|
: key === State.CacheMatchedKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
@ -267,12 +267,12 @@ describe('run', () => {
|
|
|
|
|
key === State.CachePackageManager
|
|
|
|
|
? inputs['cache']
|
|
|
|
|
: key === State.CacheMatchedKey
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
@ -297,12 +297,12 @@ describe('run', () => {
|
|
|
|
|
key === State.CachePackageManager
|
|
|
|
|
? inputs['cache']
|
|
|
|
|
: key === State.CacheMatchedKey
|
|
|
|
|
? pnpmFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
? pnpmFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
await run();
|
|
|
|
@ -327,12 +327,12 @@ describe('run', () => {
|
|
|
|
|
key === State.CachePackageManager
|
|
|
|
|
? inputs['cache']
|
|
|
|
|
: key === State.CacheMatchedKey
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
);
|
|
|
|
|
saveCacheSpy.mockImplementation(() => {
|
|
|
|
|
return -1;
|
|
|
|
@ -360,12 +360,12 @@ describe('run', () => {
|
|
|
|
|
key === State.CachePackageManager
|
|
|
|
|
? inputs['cache']
|
|
|
|
|
: key === State.CacheMatchedKey
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
? npmFileHash
|
|
|
|
|
: key === State.CachePrimaryKey
|
|
|
|
|
? yarnFileHash
|
|
|
|
|
: key === State.CachePaths
|
|
|
|
|
? '["/foo/bar"]'
|
|
|
|
|
: 'not expected'
|
|
|
|
|
);
|
|
|
|
|
saveCacheSpy.mockImplementation(() => {
|
|
|
|
|
throw new cache.ValidationError('Validation failed');
|
|
|
|
|