Skip to content

Commit

Permalink
add acceptance test
Browse files Browse the repository at this point in the history
  • Loading branch information
elbywan committed Nov 21, 2024
1 parent f5a1d8f commit 09775f8
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,16 @@ describe(`Commands`, () => {
expect(xfs.existsSync(`${path}/.yarn/cache`)).toEqual(false);
expect(xfs.existsSync(`${path}/.yarn/global/cache`)).toEqual(false);
}));

test(`it should follow the enableCacheClean configuration`, makeTemporaryEnv({
dependencies: {
[`no-deps`]: `1.0.0`,
},
}, {
enableCacheClean: false,
}, async ({path, run, source}) => {
await run(`install`);
await expect(run(`cache`, `clean`)).rejects.toThrowError();
}));
});
});

0 comments on commit 09775f8

Please sign in to comment.