Skip to content

Commit

Permalink
chore: 2 cache folders
Browse files Browse the repository at this point in the history
  • Loading branch information
AVVS committed Jan 24, 2022
1 parent 138ebf0 commit c227f5f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions __tests__/install.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ describe('test installing the package', () => {
beforeAll(async () => {
await clean();
await execFile('yarn', ['config', 'set', 'preferred-cache-folder', '/tmp/yarn-cache']);
await execFile('yarn', ['config', 'set', 'cache-folder', '/tmp/yarn-cache-internal']);
await execFile('yarn', ['config', 'set', 'prefer-offline', 'true']);
const { stdout } = await execFile('yarn', ['pack', '--filename', kFilename]);
console.info(stdout);
Expand All @@ -40,7 +41,7 @@ describe('test installing the package', () => {
});

test('is able to install package locally', async () => {
await execFile('yarn', ['add', tarball, '--offline', '--no-lockfile']);
await execFile('yarn', ['add', tarball, '--no-lockfile']);
}, 240000);

test('returns node version', async () => {
Expand Down Expand Up @@ -70,7 +71,7 @@ describe('test installing the package', () => {
expect.assertions(1);

await fs.writeFile('.releaserc.json', 'overwrite');
const { stderr } = await execFile('yarn', ['add', tarball, '--offline', '--no-lockfile']);
const { stderr } = await execFile('yarn', ['add', tarball, '--no-lockfile']);
debug(stderr);
await expect(fs.readFile('.releaserc.json', 'utf8')).resolves.toBe('overwrite');
}, 240000);
Expand All @@ -79,7 +80,7 @@ describe('test installing the package', () => {
expect.assertions(1);

await fs.writeFile('.commitlintrc.js', 'overwrite');
await execFile('yarn', ['add', tarball, '--offline', '--no-lockfile']);
await execFile('yarn', ['add', tarball, '--no-lockfile']);
await expect(fs.readFile('.commitlintrc.js', 'utf8')).resolves.toBe('overwrite');
}, 240000);
});
Expand All @@ -100,7 +101,7 @@ describe('test installing the package', () => {
});

test('is able to install package locally', async () => {
await execFile('yarn', ['add', tarball, '--offline', '--no-lockfile']);
await execFile('yarn', ['add', tarball, '--no-lockfile']);
}, 240000);

test('package.json enhanced, no husky', async () => {
Expand All @@ -126,7 +127,7 @@ describe('test installing the package', () => {

describe('installs globally', () => {
test('is able to install package globally', async () => {
await execFile('yarn', ['global', 'add', tarball, '--offline', '--no-lockfile']);
await execFile('yarn', ['global', 'add', tarball, '--no-lockfile']);
}, 240000);

test('returns current node version in module', async () => {
Expand Down

0 comments on commit c227f5f

Please sign in to comment.