Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ function getPlugins(appOrAddon) {
// Regular expression to extract the file extension from a path.
const EXT_RE = /\.[^\.]+$/;

let fileLookup = null;

module.exports = {
name: 'ember-cli-code-coverage',

Expand All @@ -45,7 +47,7 @@ module.exports = {
included: function(appOrAddon) {
this._super.included.apply(this, arguments);

this.fileLookup = {};
fileLookup = this.fileLookup = {};
this.parentRegistry = appOrAddon.registry;

if (!this._registeredWithBabel && this._isCoverageEnabled()) {
Expand Down Expand Up @@ -102,7 +104,7 @@ module.exports = {
attachMiddleware.serverMiddleware(startOptions.app, {
configPath: this.project.configPath(),
root: this.project.root,
fileLookup: this.fileLookup
fileLookup: fileLookup
});
},

Expand All @@ -113,7 +115,7 @@ module.exports = {
const config = {
configPath: this.project.configPath(),
root: this.project.root,
fileLookup: this.fileLookup
fileLookup: fileLookup
};
// if we're running `ember test --server` use the `serverMiddleware`.
if (process.argv.includes('--server') || process.argv.includes('-s')) {
Expand Down