Skip to content

Commit

Permalink
Merge pull request #82 from nathanhammond/more-config-options
Browse files Browse the repository at this point in the history
Add additional configuration options.
  • Loading branch information
stefanpenner committed Oct 2, 2015
2 parents f12f677 + 68d3dbf commit 6317f11
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ module.exports = {
var target = (parentAddon || app);
this._super.included(target);

this.options = target.options;

var testSupportPath = target.options.outputPaths.testSupport.js;
testSupportPath = testSupportPath.testSupport || testSupportPath;
testSupportPath = path.dirname(testSupportPath) || 'assets';
Expand Down Expand Up @@ -65,7 +67,8 @@ module.exports = {
);

var addonOptions = target.options['ember-cli-qunit'];
if (addonOptions && !addonOptions.disableContainerStyles) {
// Skip if disableContainerStyles === false.
if (addonOptions && addonOptions.disableContainerStyles === false) {
fileAssets.push('vendor/ember-cli-qunit/test-container-styles.css');
}

Expand Down Expand Up @@ -112,7 +115,8 @@ module.exports = {
},

contentFor: function(type) {
if (type === 'test-body') {
// Skip if insertContentForTestBody === false.
if (type === 'test-body' && !(this.options['ember-cli-qunit'] && this.options['ember-cli-qunit'].insertContentForTestBody === false)) {
return this._readTemplate('test-body');
}
},
Expand All @@ -122,6 +126,11 @@ 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;
}

var ui = this.ui;

return jshintTrees(tree, {
Expand Down

0 comments on commit 6317f11

Please sign in to comment.