Skip to content

Commit

Permalink
[BUGFIX] Fixes broccoli errors when tests dir is not present
Browse files Browse the repository at this point in the history
resolves #5946
  • Loading branch information
twokul committed Jun 20, 2016
1 parent 0387fab commit 692b3a6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/broccoli/ember-app.js
Expand Up @@ -198,7 +198,9 @@ EmberApp.prototype._initOptions = function(options) {
}

var appTree = new WatchedDir(this._resolveLocal('app'));
var testsTree = new WatchedDir(this._resolveLocal('tests'));

var testsPath = this._resolveLocal('tests');
var testsTree = existsSync(testsPath) ? new WatchedDir(testsPath) : null;

// these are contained within app/ no need to watch again
// (we should probably have the builder or the watcher dedup though)
Expand Down Expand Up @@ -1607,7 +1609,7 @@ EmberApp.prototype.toArray = function() {
this.publicTree()
];

if (this.tests) {
if (this.tests && this.trees.test) {
sourceTrees = sourceTrees.concat(this.testIndex(), this.test());
}

Expand Down

0 comments on commit 692b3a6

Please sign in to comment.