@@ -12,7 +12,7 @@ const BunyanFormat = require('bunyan-format')
1212const log = bunyan . createLogger ( {
1313 name : 'css-coverage' ,
1414 level : process . env . LOG_LEVEL || 'info' ,
15- stream : new BunyanFormat ( { outputMode : process . env . LOG_FORMAT || 'short' } )
15+ stream : new BunyanFormat ( { outputMode : process . env . LOG_FORMAT || 'short' } )
1616} )
1717
1818function parseFileName ( filePath ) {
@@ -97,7 +97,7 @@ async function initializeSourceMapConsumer () {
9797
9898 // sourceMapConsumer.eachMapping(function (m) { console.log(m.generatedLine, m.source); });
9999
100- return { sourceMapConsumer, sourceMapPath}
100+ return { sourceMapConsumer, sourceMapPath }
101101 }
102102}
103103
@@ -116,7 +116,7 @@ async function runCoverage () {
116116 await page . goto ( url )
117117 log . debug ( `Opened "${ url } "` )
118118
119- const browserLog = log . child ( { browser : 'console' } )
119+ const browserLog = log . child ( { browser : 'console' } )
120120 page . on ( 'console' , msg => {
121121 switch ( msg . type ( ) ) {
122122 case 'error' :
@@ -257,7 +257,7 @@ async function generateLcovStr (coverageOutput) {
257257 if ( ! files [ fileName ] ) {
258258 files [ fileName ] = [ ]
259259 }
260- files [ fileName ] . push ( { startLine : startLine , endLine : endLine , count : count } )
260+ files [ fileName ] . push ( { startLine : startLine , endLine : endLine , count : count } )
261261 }
262262
263263 let i = - 1
@@ -286,7 +286,7 @@ async function generateLcovStr (coverageOutput) {
286286 for ( let parseLine = origStart . line ; parseLine <= origEnd . line ; parseLine ++ ) {
287287 const curLineText = cssLines [ parseLine - 1 ]
288288 for ( let curColumn = parseColumn - 1 ; curColumn < curLineText . length ; curColumn ++ ) {
289- const info = sourceMapConsumer . originalPositionFor ( { line : parseLine , column : curColumn } )
289+ const info = sourceMapConsumer . originalPositionFor ( { line : parseLine , column : curColumn } )
290290 // stop processing when we hit origEnd
291291 if ( parseLine === origEnd . line && curColumn >= origEnd . column ) {
292292 break
@@ -302,15 +302,15 @@ async function generateLcovStr (coverageOutput) {
302302 console . error ( 'BUG: Could not look up source for this range:' )
303303 console . error ( 'origStart' , origStart )
304304 console . error ( 'origEnd' , origEnd )
305- console . error ( 'currIndexes' , { line : parseLine , column : curColumn } )
305+ console . error ( 'currIndexes' , { line : parseLine , column : curColumn } )
306306 }
307307 }
308308 }
309309 parseColumn = 1
310310 }
311311 } else {
312312 // Just cover the selectors
313- const startInfo = sourceMapConsumer . originalPositionFor ( { line : origStart . line , column : origStart . column - 1 } )
313+ const startInfo = sourceMapConsumer . originalPositionFor ( { line : origStart . line , column : origStart . column - 1 } )
314314 // const endInfo = sourceMapConsumer.originalPositionFor({line: origEnd.line, column: origEnd.column - 2})
315315
316316 // When there is no match, startInfo.source is null
0 commit comments