Returns the tree for all test files namespaced to a given addon. @public @method treeForAddonTestSupport @param {Tree} tree @return {Tree}
(tree)
| 894 | @return {Tree} |
| 895 | */ |
| 896 | treeForAddonTestSupport(tree) { |
| 897 | if (!tree) { |
| 898 | return tree; |
| 899 | } |
| 900 | |
| 901 | let namespacedTree = new Funnel(tree, { |
| 902 | srcDir: '/', |
| 903 | destDir: `/${this.moduleName()}/test-support`, |
| 904 | annotation: `Addon#treeForTestSupport (${this.name})`, |
| 905 | }); |
| 906 | |
| 907 | if (registryHasPreprocessor(this.registry, 'js')) { |
| 908 | return this.preprocessJs(namespacedTree, '/', this.name, { |
| 909 | registry: this.registry, |
| 910 | treeType: 'addon-test-support', |
| 911 | }); |
| 912 | } |
| 913 | |
| 914 | throw new SilentError( |
| 915 | `Addon test-support files were detected in \`${this._treePathFor('addon-test-support')}\`, but no JavaScript ` + |
| 916 | `preprocessor was found for \`${this.name}\`. Please make sure to add a preprocessor ` + |
| 917 | `(most likely \`ember-cli-babel\`) to \`dependencies\` (NOT \`devDependencies\`) in ` + |
| 918 | `\`${this.name}\`'s \`package.json\`.` |
| 919 | ); |
| 920 | }, |
| 921 | |
| 922 | /** |
| 923 | Runs the styles tree through preprocessors. |
nothing calls this directly
no outgoing calls
no test coverage detected
searching dependent graphs…