From 68d3dbf95fc198d5e107512ae5b809251c585551 Mon Sep 17 00:00:00 2001 From: Nathan Hammond Date: Fri, 2 Oct 2015 16:25:06 -0700 Subject: [PATCH] Add additional configuration options. --- index.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 9b3e67bc..0f28a6a4 100644 --- a/index.js +++ b/index.js @@ -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'; @@ -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'); } @@ -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'); } }, @@ -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, {