ember-cli-code-coverage
                                
                                 ember-cli-code-coverage copied to clipboard
                                
                                    ember-cli-code-coverage copied to clipboard
                            
                            
                            
                        Exclude tests and in-repo* from being instrumented to improve build/test times
By default, only files in */mirage/**/* are excluded. While helpful, tests/ and test-support/, found in in-repo-addons and in-repo-engines, are not excluded, which contributes to the amount of time it takes to instrument files.
I propose to add the following globs to exclude from being instrumented:
- */tests/**/*(All files under the app's tests/ folder)
- */lib/**/test-support/**/*(All files under the in-repo-engine or in-repo-addon test-support/ folder)
@GCheung55 I think I would be fine with this, however, isn't this already achievable with the current excludes config and manually adding those values?
@rwwagner90 it is already achievable, but what I’m proposing is adding the globs as a default which reduces manual configuration and and improves performance for large apps out of the box.
@GCheung55 will doing this effect code coverage amounts at all? I'm not really sure how it all works.
/lib//test-support// (All files under the in-repo-engine or in-repo-addon test-support/ folder)
Generally, I think this is fine, but we shouldn't use this exact glob as written. We should build up the paths for each of the actually known addons's folders. Something like:
function gatherExcludePaths(addon, excludes = new Set()) {
  excludes.add(path.join(addon.treePathFor('test-support'), '**/*'));
  addon.addons.forEach((child) => gatherExcludePaths(child, excludes));
  return excludes;
}
// ...snip...
let excludes = gatherExcludePaths(project);