From a26436356a6c1f6aea748eef096dc25e1f278982 Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Wed, 21 Oct 2020 09:23:34 -0400 Subject: [PATCH] Add comments RE: rationale for logic in treeForAddonTestSupport --- index.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/index.js b/index.js index 52eae7114..8a305b614 100644 --- a/index.js +++ b/index.js @@ -43,10 +43,19 @@ module.exports = { }, }); } else { + // this differs from ember-cli's default treeForAddonTestSupport in that it + // makes our test support modules available at `qunit-dom` **not** + // `qunit-dom/test-suppprt` let scopedInputTree = new Funnel(`${__dirname}/dist/addon-test-support`, { destDir: 'qunit-dom', }); + // in order to take advantage of ember-auto-import, we **must** use + // `preprocessJs` (because it instruments JS files looking for imports + // via the preprocessor registry) + // + // this also properly transpiles our files based on the consuming applications + // targets (through ember-cli-babel) return this.preprocessJs(scopedInputTree, '/', this.name, { annotation: `qunit-dom - treeForAddonTestSupport`, registry: this.registry,