diff --git a/libs/remix-tests/src/runTestSources.ts b/libs/remix-tests/src/runTestSources.ts index 55e6e7b123..f6cb8cbcf3 100644 --- a/libs/remix-tests/src/runTestSources.ts +++ b/libs/remix-tests/src/runTestSources.ts @@ -25,7 +25,7 @@ export class UnitTestRunner { async init (web3 = null, accounts = null) { this.web3 = await this.createWeb3Provider(web3) - this.testsAccounts = accounts || await this.web3.eth.getAccounts() + this.testsAccounts = accounts || (this.web3 && await this.web3.eth.getAccounts()) || [] this.accountsLibCode = writeTestAccountsContract(this.testsAccounts) }