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

Fixes the useLintTree: false scenario #87

Merged
merged 1 commit into from Nov 10, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ module.exports = {
error: function(data) {
ui.writeLine(data, 'ERROR');
}
}
};
},

init: function() {
Expand Down Expand Up @@ -128,7 +128,8 @@ module.exports = {
lintTree: function(type, tree) {
// Skip if useLintTree === false.
if (this.options['ember-cli-qunit'] && this.options['ember-cli-qunit'].useLintTree === false) {
return tree;
// Fakes an empty broccoli tree
return { inputTree: tree, rebuild: function() { return []; } };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should be able to return false here if using Ember-CLI master.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be less awesome towards people not yet able to migrate to the latest version of Ember-CLI.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very true. Forgot about that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is compat with ember-cli 0.2.2+, but will not work for Broccoli 1.0.0 (where the .rebuild API is deprecated).

We will need to bump minors and just return false; at some point to avoid deprecations there (definitely fine to do at a later date when we use Broccoli 1.0.0 in ember-cli).

}

var ui = this.ui;
Expand Down