Skip to content

Commit fcfae7b

Browse files
committed
prevent ember-cli-code-coverage babel plugin setup from leaking when parent runs tests w/ COVERAGE=true
1 parent 59cc179 commit fcfae7b

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

index.js

+9-3
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,21 @@ const DEFAULT_PAGE_TITLE = 'Upfluence Software';
88

99
module.exports = {
1010
name: require('./package').name,
11+
1112
options: {
1213
'@embroider/macros': {
1314
setOwnConfig: {
1415
brand: process.env.BRAND || DEFAULT_BRAND,
1516
brandPageTitle: process.env.BRAND_PAGE_TITLE || DEFAULT_PAGE_TITLE
1617
}
17-
},
18-
babel: {
19-
plugins: [...require('ember-cli-code-coverage').buildBabelPlugin()],
18+
}
19+
},
20+
21+
included(parent) {
22+
this._super.included.apply(this, arguments);
23+
24+
if (parent.name === 'dummy') {
25+
this.options.babel.plugins.push(...require('ember-cli-code-coverage').buildBabelPlugin());
2026
}
2127
},
2228

0 commit comments

Comments
 (0)