Skip to content

Commit 0b71235

Browse files
committed
test: restore dist folder after the tests are done
1 parent 8b0f41b commit 0b71235

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

playground/__tests__/cli.test.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ describe('Test the config-sync CLI', () => {
6161

6262
test('Import build project', async () => {
6363
// First we make sure the dist folder is deleted.
64-
await exec('rm -rf dist');
64+
await exec('mv dist .tmp');
6565

6666
await exec('yarn cs import -y');
6767

@@ -70,6 +70,10 @@ describe('Test the config-sync CLI', () => {
7070
expect(buildOutput).toContain('src');
7171
expect(buildOutput).toContain('tsconfig.tsbuildinfo');
7272

73+
// We restore the dist folder.
74+
await exec('rm -rf dist');
75+
await exec('mv .tmp/dist ./dist');
76+
7377
});
7478
test('Import project already built', async () => {
7579

@@ -93,5 +97,8 @@ describe('Test the config-sync CLI', () => {
9397
expect(buildOutput).toContain('src');
9498
expect(buildOutput).not.toContain('tsconfig.tsbuildinfo');
9599

100+
// We restore the tsconfig.tsbuildinfo file.
101+
await exec('mv .tmp/tsconfig.tsbuildinfo dist/tsconfig.tsbuildinfo');
102+
96103
});
97104
});

0 commit comments

Comments
 (0)