@@ -200,7 +200,7 @@ describe('e2e general tests', function () {
200200 beforeEach ( ( ) => {
201201 const padded = String ( folderCounter ) . padStart ( 2 , '0' )
202202
203- useFixtureFolder ( PATH + 'repo' + padded )
203+ useFixtureFolder ( this , PATH + 'repo' + padded )
204204
205205 folderCounter ++
206206 } )
@@ -242,22 +242,23 @@ describe('e2e general tests', function () {
242242
243243function useFixture ( dir ) {
244244 beforeEach ( `switch to ${ dir } ` , function ( ) {
245- useFixtureFolder ( dir ) ;
245+ useFixtureFolder ( this , dir ) ;
246246 } )
247247}
248248
249- const useFixtureFolder = ( dir ) => {
249+ function useFixtureFolder ( ctx , dir ) {
250250 const fixturePath = path . join ( __dirname , dir )
251251
252252 const tmpDirContainer = os . tmpdir ( )
253- this . testDirPath = path . join ( tmpDirContainer , `solhint-tests-${ dir } ` )
253+ const testDirPath = path . join ( tmpDirContainer , `solhint-tests-${ dir } ` )
254254
255- fs . ensureDirSync ( this . testDirPath )
256- fs . emptyDirSync ( this . testDirPath )
255+ ctx . testDirPath = testDirPath
257256
258- fs . copySync ( fixturePath , this . testDirPath )
257+ fs . ensureDirSync ( testDirPath )
258+ fs . emptyDirSync ( testDirPath )
259+ fs . copySync ( fixturePath , testDirPath )
259260
260- shell . cd ( this . testDirPath )
261+ shell . cd ( testDirPath )
261262}
262263
263264function createDummyFile ( fullFilePath , content = '// dummy file\npragma solidity ^0.8.0;' ) {
0 commit comments