From 68a49265ae865727616b47d0aecc19ad6ba5c41b Mon Sep 17 00:00:00 2001 From: Tobias Bieniek Date: Wed, 6 Dec 2017 09:44:48 +0100 Subject: [PATCH] blueprints: Extend test framework detection to `ember-qunit` and `ember-mocha` --- blueprints/test-framework-detector.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/blueprints/test-framework-detector.js b/blueprints/test-framework-detector.js index 356ac462991..6d0720a9e9c 100644 --- a/blueprints/test-framework-detector.js +++ b/blueprints/test-framework-detector.js @@ -11,8 +11,12 @@ module.exports = function(blueprint) { var type; var dependencies = this.project.dependencies(); - if ('ember-cli-qunit' in dependencies) { + if ('ember-qunit' in dependencies || 'ember-cli-qunit' in dependencies) { type = 'qunit'; + + } else if ('ember-mocha' in dependencies) { + type = 'mocha-0.12'; + } else if ('ember-cli-mocha' in dependencies) { var checker = new VersionChecker({ root: this.project.root }); if (fs.existsSync(this.path + '/mocha-0.12-files') && checker.for('ember-cli-mocha', 'npm').satisfies('>=0.12.0')) { @@ -20,6 +24,7 @@ module.exports = function(blueprint) { } else { type = 'mocha'; } + } else { this.ui.writeLine('Couldn\'t determine test style - using QUnit'); type = 'qunit';