diff --git a/playground/__tests__/cli.test.js b/playground/__tests__/cli.test.js index 1b1c7bf..8ace6c6 100644 --- a/playground/__tests__/cli.test.js +++ b/playground/__tests__/cli.test.js @@ -61,7 +61,7 @@ describe('Test the config-sync CLI', () => { test('Import build project', async () => { // First we make sure the dist folder is deleted. - await exec('rm -rf dist'); + await exec('mv dist .tmp'); await exec('yarn cs import -y'); @@ -70,6 +70,10 @@ describe('Test the config-sync CLI', () => { expect(buildOutput).toContain('src'); expect(buildOutput).toContain('tsconfig.tsbuildinfo'); + // We restore the dist folder. + await exec('rm -rf dist'); + await exec('mv .tmp/dist ./dist'); + }); test('Import project already built', async () => { @@ -93,5 +97,8 @@ describe('Test the config-sync CLI', () => { expect(buildOutput).toContain('src'); expect(buildOutput).not.toContain('tsconfig.tsbuildinfo'); + // We restore the tsconfig.tsbuildinfo file. + await exec('mv .tmp/tsconfig.tsbuildinfo dist/tsconfig.tsbuildinfo'); + }); });