Skip to content

Commit

Permalink
blueprints: Extend test framework detection to ember-qunit and `emb…
Browse files Browse the repository at this point in the history
…er-mocha`
  • Loading branch information
Turbo87 committed Dec 6, 2017
1 parent d5f57aa commit 68a4926
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion blueprints/test-framework-detector.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@ 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')) {
type = 'mocha-0.12';
} else {
type = 'mocha';
}

} else {
this.ui.writeLine('Couldn\'t determine test style - using QUnit');
type = 'qunit';
Expand Down

0 comments on commit 68a4926

Please sign in to comment.