Skip to content

Commit

Permalink
Add compatibility check for ember-cli-qunit@4
Browse files Browse the repository at this point in the history
  • Loading branch information
trentmwillis committed Oct 5, 2017
1 parent d854cda commit 9d79643
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ module.exports = {
name: 'ember-exam',

includedCommands: function() {
var emberCliQunitCompatCheck = require('./lib/utils/ember-cli-qunit-compat-check');
emberCliQunitCompatCheck(this);

return require('./lib/commands');
},

Expand Down
12 changes: 12 additions & 0 deletions lib/utils/ember-cli-qunit-compat-check.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
'use strict';

var VersionChecker = require('ember-cli-version-checker');

module.exports = function emberCliQunitCompatCheck(addon) {
var checker = new VersionChecker(addon);
var dep = checker.for('ember-cli-qunit', 'npm');

if (dep.isAbove('4.0.0')) {
console.error('\x1b[31m', '\nERROR: [email protected] is not compatible with ember-cli-qunit versions >= 4.0.0. Please upgrade to [email protected] or higher. See http://bit.ly/2yqVGDC for more info.\n', '\x1b[0m');
}
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
"cli-table2": "^0.2.0",
"debug": "^2.2.0",
"ember-cli-babel": "^5.1.6",
"ember-cli-version-checker": "^1.3.1",
"fs-extra": "^0.30.0",
"rimraf": "^2.5.4"
},
Expand Down

0 comments on commit 9d79643

Please sign in to comment.