test: restore dist folder after the tests are done

pull/187/head
gboutte 2025-06-29 19:03:27 +02:00
parent 8b0f41bcd1
commit 0b71235389
1 changed files with 8 additions and 1 deletions

View File

@ -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');
});
});