diff --git a/packages/compat/src/compat-app-builder.ts b/packages/compat/src/compat-app-builder.ts index 383c2c7bb..b3525b141 100644 --- a/packages/compat/src/compat-app-builder.ts +++ b/packages/compat/src/compat-app-builder.ts @@ -457,11 +457,11 @@ export class CompatAppBuilder { this.compatApp.macrosConfig.finalize(); // on first build, clear the output directory completely - if (this.firstBuild && existsSync(this.root)) { - console.log('delete files'); - for (const path of readdirSync(this.root)) { - console.log('delete', path); - rmSync(join(this.root, path), { recursive: true, force: true }); + if (this.firstBuild) { + if (existsSync(this.root)) { + for (const path of readdirSync(this.root)) { + rmSync(join(this.root, path), { recursive: true, force: true }); + } } this.firstBuild = false; } diff --git a/tests/scenarios/compat-dummy-app-test.ts b/tests/scenarios/compat-dummy-app-test.ts index c6003e7e0..1ffd69f6e 100644 --- a/tests/scenarios/compat-dummy-app-test.ts +++ b/tests/scenarios/compat-dummy-app-test.ts @@ -58,8 +58,7 @@ dummyAppScenarios }); }); - test('rebuilds addon code', async function (assert) { - assert.timeout(5 * 60 * 1000); + test('rebuilds addon code', async function () { expectFile('../../components/example.hbs').matches(/hello/); writeFileSync(join(app.dir, 'addon/components/example.hbs'), 'goodbye'); await builder.build({ changedDirs: [app.dir] });