test: restore dist folder after the tests are done
parent
8b0f41bcd1
commit
0b71235389
|
@ -61,7 +61,7 @@ describe('Test the config-sync CLI', () => {
|
||||||
|
|
||||||
test('Import build project', async () => {
|
test('Import build project', async () => {
|
||||||
// First we make sure the dist folder is deleted.
|
// 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');
|
await exec('yarn cs import -y');
|
||||||
|
|
||||||
|
@ -70,6 +70,10 @@ describe('Test the config-sync CLI', () => {
|
||||||
expect(buildOutput).toContain('src');
|
expect(buildOutput).toContain('src');
|
||||||
expect(buildOutput).toContain('tsconfig.tsbuildinfo');
|
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 () => {
|
test('Import project already built', async () => {
|
||||||
|
|
||||||
|
@ -93,5 +97,8 @@ describe('Test the config-sync CLI', () => {
|
||||||
expect(buildOutput).toContain('src');
|
expect(buildOutput).toContain('src');
|
||||||
expect(buildOutput).not.toContain('tsconfig.tsbuildinfo');
|
expect(buildOutput).not.toContain('tsconfig.tsbuildinfo');
|
||||||
|
|
||||||
|
// We restore the tsconfig.tsbuildinfo file.
|
||||||
|
await exec('mv .tmp/tsconfig.tsbuildinfo dist/tsconfig.tsbuildinfo');
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue