diff --git a/libs/remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.4.24.ts b/libs/remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.4.24.ts index 67607d7a35..8052a1870a 100644 --- a/libs/remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.4.24.ts +++ b/libs/remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.4.24.ts @@ -814,12 +814,11 @@ test('Integration test forLoopIteratesOverDynamicArray module', function (t: tes function runModuleOnFiles (Module: any, t: test.Test, cb: ((fname: string, report: AnalysisReportObj[]) => void)): void { const statRunner: StatRunner = new StatRunner() testFiles.forEach((fileName: string) => { - statRunner.runWithModuleList(compilationResults[fileName], [{ name: new Module().name, mod: new Module() }], (reports: AnalysisReport[]) => { - let report: AnalysisReportObj[] = reports[0].report - if (report.some((x: AnalysisReportObj) => x.warning.includes('INTERNAL ERROR'))) { - t.comment('Error while executing Module: ' + JSON.stringify(report)) - } - cb(fileName, report) - }) + const reports = statRunner.runWithModuleList(compilationResults[fileName], [{ name: new Module().name, mod: new Module() }]) + let report: AnalysisReportObj[] = reports[0].report + if (report.some((x: AnalysisReportObj) => x.warning.includes('INTERNAL ERROR'))) { + t.comment('Error while executing Module: ' + JSON.stringify(report)) + } + cb(fileName, report) }) } diff --git a/libs/remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.5.0.ts b/libs/remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.5.0.ts index 780cfa2b63..aa14866a69 100644 --- a/libs/remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.5.0.ts +++ b/libs/remix-analyzer/test/analysis/staticAnalysisIntegration-test-0.5.0.ts @@ -816,12 +816,11 @@ test('Integration test forLoopIteratesOverDynamicArray module', function (t: tes function runModuleOnFiles (Module: any, t: test.Test, cb: ((fname: string, report: AnalysisReportObj[]) => void)): void { const statRunner: StatRunner = new StatRunner() testFiles.forEach((fileName: string) => { - statRunner.runWithModuleList(compilationResults[fileName], [{ name: new Module().name, mod: new Module() }], (reports: AnalysisReport[]) => { - let report: AnalysisReportObj[] = reports[0].report - if (report.some((x: AnalysisReportObj) => x['warning'].includes('INTERNAL ERROR'))) { - t.comment('Error while executing Module: ' + JSON.stringify(report)) - } - cb(fileName, report) - }) + const reports = statRunner.runWithModuleList(compilationResults[fileName], [{ name: new Module().name, mod: new Module() }]) + let report: AnalysisReportObj[] = reports[0].report + if (report.some((x: AnalysisReportObj) => x['warning'].includes('INTERNAL ERROR'))) { + t.comment('Error while executing Module: ' + JSON.stringify(report)) + } + cb(fileName, report) }) } diff --git a/libs/remix-analyzer/test/analysis/staticAnalysisIssues-test-0.4.24.ts b/libs/remix-analyzer/test/analysis/staticAnalysisIssues-test-0.4.24.ts index de6303ef89..2a6091dc32 100644 --- a/libs/remix-analyzer/test/analysis/staticAnalysisIssues-test-0.4.24.ts +++ b/libs/remix-analyzer/test/analysis/staticAnalysisIssues-test-0.4.24.ts @@ -31,10 +31,9 @@ test('staticAnalysisIssues.functionParameterPassingError', function (t) { const statRunner: StatRunner = new StatRunner() t.doesNotThrow(() => { - statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module() }], (reports: AnalysisReport[]) => {}) + statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module()}]) }, 'Analysis should not throw') - statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module() }], (reports: AnalysisReport[]) => { - t.ok(!reports.some((mod: AnalysisReport) => mod.report.some((rep: AnalysisReportObj) => rep.warning.includes('INTERNAL ERROR')), 'Should not have internal errors')) - }) + const reports = statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module()}]) + t.ok(!reports.some((mod: AnalysisReport) => mod.report.some((rep: AnalysisReportObj) => rep.warning.includes('INTERNAL ERROR')), 'Should not have internal errors')) }) diff --git a/libs/remix-analyzer/test/analysis/staticAnalysisIssues-test-0.5.0.ts b/libs/remix-analyzer/test/analysis/staticAnalysisIssues-test-0.5.0.ts index beac78be6d..43234e4168 100644 --- a/libs/remix-analyzer/test/analysis/staticAnalysisIssues-test-0.5.0.ts +++ b/libs/remix-analyzer/test/analysis/staticAnalysisIssues-test-0.5.0.ts @@ -31,10 +31,9 @@ test('staticAnalysisIssues.functionParameterPassingError', function (t) { const statRunner: StatRunner = new StatRunner() t.doesNotThrow(() => { - statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module() }], (reports: AnalysisReport[]) => {}) + statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module() }]) }, 'Analysis should not throw') - statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module() }], (reports: AnalysisReport[]) => { - t.ok(!reports.some((mod: AnalysisReport) => mod.report.some((rep: AnalysisReportObj) => rep.warning.includes('INTERNAL ERROR')), 'Should not have internal errors')) - }) + const reports = statRunner.runWithModuleList(res, [{ name: new Module().name, mod: new Module() }]) + t.ok(!reports.some((mod: AnalysisReport) => mod.report.some((rep: AnalysisReportObj) => rep.warning.includes('INTERNAL ERROR')), 'Should not have internal errors')) })