Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Preprocess addon-test-support files in upcoming ember-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Trent Willis committed Dec 13, 2016
1 parent 92069d5 commit 2a36a6e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ module.exports = {
// this can be removed when we no longer support 2.2.0-beta.{1,2}
this._shouldImportQUnit = !dep.gt('2.2.0-beta.2');

this._shouldPreprocessAddonTestSupport = dep.gt('2.11.0-beta.1');

this.setTestGenerator();
},

Expand All @@ -46,7 +48,15 @@ module.exports = {

treeForAddonTestSupport: function() {
var MergeTrees = require('broccoli-merge-trees');
return new MergeTrees(this._getDependencyTrees());
var tree = new MergeTrees(this._getDependencyTrees());

if (this._shouldPreprocessAddonTestSupport) {
return this.preprocessJs(tree, {
registry: this.registry
});
} else {
return tree;
}
},

treeForVendor: function(tree) {
Expand Down

0 comments on commit 2a36a6e

Please sign in to comment.