@@ -4,7 +4,7 @@ const path = require("path");
44const fs = require ( "fs" ) ;
55const asyncLib = require ( "neo-async" ) ;
66const Benchmark = require ( "benchmark" ) ;
7- const { remove} = require ( "./helpers/remove" ) ;
7+ const { remove } = require ( "./helpers/remove" ) ;
88
99describe ( "BenchmarkTestCases" , function ( ) {
1010 const casesPath = path . join ( __dirname , "benchmarkCases" ) ;
@@ -76,10 +76,9 @@ describe("BenchmarkTestCases", function() {
7676 }
7777
7878 function doLoadWebpack ( ) {
79- const baselineWebpack = require . requireActual ( path . resolve (
80- baselinePath ,
81- "lib/webpack.js"
82- ) ) ;
79+ const baselineWebpack = require . requireActual (
80+ path . resolve ( baselinePath , "lib/webpack.js" )
81+ ) ;
8382 baselines . push ( {
8483 name : baselineInfo . name ,
8584 rev : baselineRevision ,
@@ -88,9 +87,10 @@ describe("BenchmarkTestCases", function() {
8887 callback ( ) ;
8988 }
9089 } ,
91- ( err ) => {
90+ err => {
9291 if ( err ) {
9392 done ( err ) ;
93+ return ;
9494 }
9595 createTests ( ) ;
9696 done ( ) ;
@@ -101,11 +101,11 @@ describe("BenchmarkTestCases", function() {
101101
102102 afterAll ( ( ) => {
103103 remove ( baselinesPath ) ;
104- } )
104+ } ) ;
105105
106106 function getBaselineRevs ( rootPath , callback ) {
107107 const git = require ( "simple-git" ) ( rootPath ) ;
108- const lastVersionTag = "v" + require . requireActual ( "../package.json" ) . version ;
108+ const lastVersionTag = "v" + require ( "../package.json" ) . version ;
109109 git . raw ( [ "rev-list" , "-n" , "1" , lastVersionTag ] , ( err , resultVersion ) => {
110110 if ( err ) return callback ( err ) ;
111111 const matchVersion = / ^ ( [ a - f 0 - 9 ] + ) \s * $ / . exec ( resultVersion ) ;
@@ -289,7 +289,10 @@ describe("BenchmarkTestCases", function() {
289289 `baseline-${ baseline . name } ` ,
290290 testName
291291 ) ;
292- const config = require . requireActual ( path . join ( testDirectory , "webpack.config.js" ) ) || { }
292+ const config =
293+ require . requireActual (
294+ path . join ( testDirectory , "webpack.config.js" )
295+ ) || { } ;
293296 config . output = config . output || { } ;
294297 if ( ! config . context ) config . context = testDirectory ;
295298 if ( ! config . output . path ) config . output . path = outputDirectory ;
@@ -314,7 +317,10 @@ describe("BenchmarkTestCases", function() {
314317 `baseline-${ baseline . name } ` ,
315318 testName
316319 ) ;
317- const config = require . requireActual ( path . join ( testDirectory , "webpack.config.js" ) ) || { } ;
320+ const config =
321+ require . requireActual (
322+ path . join ( testDirectory , "webpack.config.js" )
323+ ) || { } ;
318324 config . output = config . output || { } ;
319325 if ( ! config . context ) config . context = testDirectory ;
320326 if ( ! config . output . path ) config . output . path = outputDirectory ;
@@ -339,7 +345,9 @@ describe("BenchmarkTestCases", function() {
339345 baselineStats . text
340346 } ) (90% confidence)`
341347 ) ;
342- } else if ( baselineStats . minConfidence > headStats . maxConfidence ) {
348+ } else if (
349+ baselineStats . minConfidence > headStats . maxConfidence
350+ ) {
343351 console . log (
344352 `======> HEAD is ${ Math . round (
345353 baselineStats . mean / headStats . mean * 100 - 100
0 commit comments