Skip to content

Commit 5e1bfbb

Browse files
author
Maël Nison
committed
Adds an integration test
1 parent 7a2b051 commit 5e1bfbb

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

__tests__/integration.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,3 +70,20 @@ test('--mutex network', async () => {
7070
execa(command, ['add', 'foo'].concat(args), options),
7171
]);
7272
});
73+
74+
test('cache folder fallback', async () => {
75+
const cwd = await makeTemp();
76+
const cacheFolder = path.join(cwd, '.cache');
77+
78+
await fs.mkdirp(cacheFolder);
79+
await fs.chmod(cacheFolder, 0o000);
80+
81+
const command = path.resolve(__dirname, '../bin/yarn');
82+
const args = ['--preferred-cache-folder', cacheFolder];
83+
84+
const options = {cwd};
85+
86+
await Promise.all([
87+
execa(command, ['cache', 'dir'].concat(args), options),
88+
]);
89+
});

0 commit comments

Comments
 (0)