Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7a13285

Browse files
committedNov 22, 2024
add acceptance test
1 parent 0b124f9 commit 7a13285

File tree

1 file changed

+11
-0
lines changed
  • packages/acceptance-tests/pkg-tests-specs/sources/commands/cache

1 file changed

+11
-0
lines changed
 

‎packages/acceptance-tests/pkg-tests-specs/sources/commands/cache/clean.test.js

+11
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,16 @@ describe(`Commands`, () => {
3737
expect(xfs.existsSync(`${path}/.yarn/cache`)).toEqual(false);
3838
expect(xfs.existsSync(`${path}/.yarn/global/cache`)).toEqual(false);
3939
}));
40+
41+
test(`it should follow the enableCacheClean configuration`, makeTemporaryEnv({
42+
dependencies: {
43+
[`no-deps`]: `1.0.0`,
44+
},
45+
}, {
46+
enableCacheClean: false,
47+
}, async ({path, run, source}) => {
48+
await run(`install`);
49+
await expect(run(`cache`, `clean`)).rejects.toThrowError();
50+
}));
4051
});
4152
});

0 commit comments

Comments
 (0)
Please sign in to comment.