From b4b1c7d88d2b640c8573f38fe59a96e8e31fecce Mon Sep 17 00:00:00 2001 From: ijlee2 Date: Thu, 5 Sep 2024 10:46:46 +0200 Subject: [PATCH] Revert "bugfix: Created the barrel file for test-support" This reverts commit 01481abe4f75b81584f11cec16ba543e98fd21aa. --- src/steps/move-addon-files.ts | 14 +------------- .../src/{test-support.ts => test-support/index.ts} | 0 tests/steps/move-addon-files/test-support.test.ts | 2 +- 3 files changed, 2 insertions(+), 14 deletions(-) rename tests/fixtures/hello-world/output/hello-world/src/{test-support.ts => test-support/index.ts} (100%) diff --git a/src/steps/move-addon-files.ts b/src/steps/move-addon-files.ts index b13020ba..6708ed98 100644 --- a/src/steps/move-addon-files.ts +++ b/src/steps/move-addon-files.ts @@ -25,19 +25,7 @@ function moveAddonFolder(options: Options): void { function moveAddonTestSupportFolder(options: Options): void { const { locations, projectRoot } = options; - let filePaths = findFiles('addon-test-support/index.{js,ts}', { - projectRoot, - }); - - if (filePaths.length === 1) { - const oldPath = filePaths[0]!; - const newPath = `${locations.addon}/src/test-support${oldPath.endsWith('.ts') ? '.ts' : 'js'}`; - - moveFiles(new Map([[oldPath, newPath]]), options); - } - - filePaths = findFiles('addon-test-support/**/*', { - ignoreList: ['addon-test-support/index.{js,ts}'], + const filePaths = findFiles('addon-test-support/**/*', { projectRoot, }); diff --git a/tests/fixtures/hello-world/output/hello-world/src/test-support.ts b/tests/fixtures/hello-world/output/hello-world/src/test-support/index.ts similarity index 100% rename from tests/fixtures/hello-world/output/hello-world/src/test-support.ts rename to tests/fixtures/hello-world/output/hello-world/src/test-support/index.ts diff --git a/tests/steps/move-addon-files/test-support.test.ts b/tests/steps/move-addon-files/test-support.test.ts index 4a76198c..9858602e 100644 --- a/tests/steps/move-addon-files/test-support.test.ts +++ b/tests/steps/move-addon-files/test-support.test.ts @@ -23,8 +23,8 @@ test('steps | move-addon-files > test-support', function () { components: { 'container-query.ts': '', }, + 'index.ts': `export * from './components/container-query';\n`, }, - 'test-support.ts': `export * from './components/container-query';\n`, }, }, };