Skip to content

Commit

Permalink
Fix ReferenceError in check-coverage.js
Browse files Browse the repository at this point in the history
  • Loading branch information
takahirox committed Oct 21, 2020
1 parent 6026dea commit a3e1703
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/e2e/check-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ const S = fs.readdirSync( './examples/screenshots' )

// files.js
const F = [];
eval( fs.readFileSync( './examples/files.js' ).toString() );
for ( var key in files ) {
// To expose files variable to out of eval scope, we need var statement, not const.
eval( fs.readFileSync( './examples/files.js' )
.toString().replace( 'const files', 'var files' ) );
for ( const key in files ) {

var section = files[ key ];
for ( var i = 0, len = section.length; i < len; i ++ ) {
const section = files[ key ];
for ( let i = 0, len = section.length; i < len; i ++ ) {

F.push( section[ i ] );

Expand Down

0 comments on commit a3e1703

Please sign in to comment.