-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.js
39 lines (32 loc) · 995 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* eslint-env node */
'use strict';
const Funnel = require('broccoli-funnel');
module.exports = {
name: 'qunit-console-grouper',
isEnabled() {
// support `QUNIT_CONSOLE_GROUPER` environment variable: true/false
if (process.env.QUNIT_CONSOLE_GROUPER) {
return process.env.QUNIT_CONSOLE_GROUPER === 'true';
}
if (process.env.EMBER_CLI_TEST_COMMAND === 'true') {
// disable this addon for `ember test`, but not `ember test --server`
return (
process.argv.includes('--server') ||
process.argv.includes('-server') ||
process.argv.includes('--serve') ||
process.argv.includes('-serve') ||
process.argv.includes('-s')
);
}
return true;
},
included() {
this._super.included.apply(this, arguments);
this.import('vendor/qunit-console-grouper.js', { type: 'test' });
},
treeForVendor() {
return new Funnel(`${__dirname}/lib`, {
files: ['qunit-console-grouper.js'],
});
},
};