From cbe18610051bdeb500623081b8aac8a202c15b28 Mon Sep 17 00:00:00 2001 From: Philippe Ndiaye Date: Mon, 23 Dec 2024 10:41:40 +0100 Subject: [PATCH] prevent ember-cli-code-coverage babel plugin setup from leaking when parent runs tests w/ COVERAGE=true --- index.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 57f42f7..8973214 100644 --- a/index.js +++ b/index.js @@ -17,9 +17,14 @@ module.exports = { setOwnConfig: { buildEnv: process.env.BUILD_ENV || 'staging' } - }, - babel: { - plugins: [...require('ember-cli-code-coverage').buildBabelPlugin()] + } + }, + + included(parent) { + this._super.included.apply(this, arguments); + + if (parent.name === 'dummy') { + this.options.babel.plugins.push(...require('ember-cli-code-coverage').buildBabelPlugin()); } },