Merge pull request #1406 from ethereum/fix/#951

Injected tests.sol
pull/7/head
yann300 5 years ago committed by GitHub
commit cf9417e810
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      remix-tests/src/compiler.ts

@ -153,6 +153,7 @@ export function compileContractSources(sources: SrcIfc, versionUrl: any, usingWo
const accounts: string[] = opts.accounts || [] const accounts: string[] = opts.accounts || []
// Iterate over sources keys. Inject test libraries. Inject test library import statements. // Iterate over sources keys. Inject test libraries. Inject test library import statements.
if (!('remix_tests.sol' in sources) && !('tests.sol' in sources)) { if (!('remix_tests.sol' in sources) && !('tests.sol' in sources)) {
sources['tests.sol'] = { content: require('../sol/tests.sol.js') }
sources['remix_tests.sol'] = { content: require('../sol/tests.sol.js') } sources['remix_tests.sol'] = { content: require('../sol/tests.sol.js') }
sources['remix_accounts.sol'] = { content: writeTestAccountsContract(accounts) } sources['remix_accounts.sol'] = { content: writeTestAccountsContract(accounts) }
} }

Loading…
Cancel
Save