@@ -26,12 +26,12 @@ module.exports = {
26
26
fileLookup : null ,
27
27
28
28
// Ember Methods
29
- init : function ( ) {
29
+ init ( ) {
30
30
this . _super . init . apply ( this , arguments ) ;
31
31
this . fileLookup = { } ;
32
32
} ,
33
33
34
- included : function ( appOrAddon ) {
34
+ included ( appOrAddon ) {
35
35
this . _super . included . apply ( this , arguments ) ;
36
36
37
37
this . parentRegistry = appOrAddon . registry ;
@@ -59,7 +59,7 @@ module.exports = {
59
59
}
60
60
} ,
61
61
62
- contentFor : function ( type ) {
62
+ contentFor ( type ) {
63
63
if ( type === 'test-body-footer' && this . _isCoverageEnabled ( ) ) {
64
64
var template = fs
65
65
. readFileSync ( path . join ( __dirname , 'lib' , 'templates' , 'test-body-footer.html' ) )
@@ -73,7 +73,7 @@ module.exports = {
73
73
return undefined ;
74
74
} ,
75
75
76
- includedCommands : function ( ) {
76
+ includedCommands ( ) {
77
77
return {
78
78
'coverage-merge' : require ( './lib/coverage-merge' ) ,
79
79
} ;
@@ -83,7 +83,7 @@ module.exports = {
83
83
* If coverage is enabled attach coverage middleware to the express server run by ember-cli
84
84
* @param {Object } startOptions - Express server start options
85
85
*/
86
- serverMiddleware : function ( startOptions ) {
86
+ serverMiddleware ( startOptions ) {
87
87
if ( ! this . _isCoverageEnabled ( ) ) {
88
88
return ;
89
89
}
@@ -94,7 +94,7 @@ module.exports = {
94
94
} ) ;
95
95
} ,
96
96
97
- testemMiddleware : function ( app ) {
97
+ testemMiddleware ( app ) {
98
98
if ( ! this . _isCoverageEnabled ( ) ) {
99
99
return ;
100
100
}
@@ -118,15 +118,15 @@ module.exports = {
118
118
* Get project configuration
119
119
* @returns {Configuration } project configuration
120
120
*/
121
- _getConfig : function ( ) {
121
+ _getConfig ( ) {
122
122
return config ( this . project . configPath ( ) ) ;
123
123
} ,
124
124
125
125
/**
126
126
* Get paths to include for coverage
127
127
* @returns {Array<String> } include paths
128
128
*/
129
- _getIncludes : function ( ) {
129
+ _getIncludes ( ) {
130
130
return [
131
131
...this . _getIncludesForAppDirectory ( ) ,
132
132
...this . _getIncludesForAddonDirectory ( ) ,
@@ -138,7 +138,7 @@ module.exports = {
138
138
* Get paths to include for covering the "app" directory.
139
139
* @returns {Array<String> } include paths
140
140
*/
141
- _getIncludesForAppDirectory : function ( ) {
141
+ _getIncludesForAppDirectory ( ) {
142
142
const dir = path . join ( this . project . root , 'app' ) ;
143
143
let prefix = this . parent . isEmberCLIAddon ( ) ? 'dummy' : this . parent . name ( ) ;
144
144
return this . _getIncludesForDir ( dir , prefix ) ;
@@ -148,7 +148,7 @@ module.exports = {
148
148
* Get paths to include for covering the "addon" directory.
149
149
* @returns {Array<String> } include paths
150
150
*/
151
- _getIncludesForAddonDirectory : function ( ) {
151
+ _getIncludesForAddonDirectory ( ) {
152
152
let addon = this . _findCoveredAddon ( ) ;
153
153
if ( addon ) {
154
154
const addonDir = path . join ( this . project . root , 'addon' ) ;
@@ -167,7 +167,7 @@ module.exports = {
167
167
* Get paths to include for covering the in-repo-addon directories in "lib/*".
168
168
* @returns {Array<String> } include paths
169
169
*/
170
- _getIncludesForInRepoAddonDirectories : function ( ) {
170
+ _getIncludesForInRepoAddonDirectories ( ) {
171
171
return this . _findInRepoAddons ( ) . reduce ( ( acc , addon ) => {
172
172
let addonDir = path . join ( this . project . root , 'lib' , addon . name ) ;
173
173
let addonAppDir = path . join ( addonDir , 'app' ) ;
@@ -189,7 +189,7 @@ module.exports = {
189
189
* @param {String } prefix The prefix to the ember module ('app', 'dummy' or the name of the addon).
190
190
* @returns {Array<String> } include paths
191
191
*/
192
- _getIncludesForDir : function ( dir , prefix ) {
192
+ _getIncludesForDir ( dir , prefix ) {
193
193
const hasEmberCliTypescript =
194
194
this . project &&
195
195
this . project . findAddonByName &&
@@ -213,15 +213,15 @@ module.exports = {
213
213
* Get paths to exclude from coverage
214
214
* @returns {Array<String> } exclude paths
215
215
*/
216
- _getExcludes : function ( ) {
216
+ _getExcludes ( ) {
217
217
return this . _getConfig ( ) . excludes || [ ] ;
218
218
} ,
219
219
220
220
/**
221
221
* Determine whether or not coverage is enabled
222
222
* @returns {Boolean } whether or not coverage is enabled
223
223
*/
224
- _isCoverageEnabled : function ( ) {
224
+ _isCoverageEnabled ( ) {
225
225
var value = process . env [ this . _getConfig ( ) . coverageEnvVar ] || false ;
226
226
227
227
if ( value . toLowerCase ) {
@@ -235,7 +235,7 @@ module.exports = {
235
235
* Determine the name of the parent app or addon.
236
236
* @returns {String } the name of the parent
237
237
*/
238
- _parentName : function ( ) {
238
+ _parentName ( ) {
239
239
if ( this . parent . isEmberCLIAddon ( ) ) {
240
240
return this . _findCoveredAddon ( ) . name ;
241
241
} else {
@@ -247,7 +247,7 @@ module.exports = {
247
247
* Find the addon (if any) that's being covered.
248
248
* @returns {Addon } the addon under test
249
249
*/
250
- _findCoveredAddon : function ( ) {
250
+ _findCoveredAddon ( ) {
251
251
if ( ! this . _coveredAddon ) {
252
252
this . _coveredAddon = this . project . findAddonByName ( this . project . pkg . name ) ;
253
253
}
@@ -259,7 +259,7 @@ module.exports = {
259
259
* Find the app's in-repo addons (if any).
260
260
* @returns {Array<Addon> } the in-repo addons
261
261
*/
262
- _findInRepoAddons : function ( ) {
262
+ _findInRepoAddons ( ) {
263
263
if ( ! this . _inRepoAddons ) {
264
264
const pkg = this . project . pkg ;
265
265
const inRepoAddonPaths = pkg [ 'ember-addon' ] && pkg [ 'ember-addon' ] . paths ;
0 commit comments