Merge pull request #1049 from ethereum/fixUnitTesting

Fix unit testing error message
pull/5370/head
yann300 6 years ago committed by GitHub
commit f43b4b1e60
  1. 1
      remix-lib/src/web3Provider/web3VmProvider.js
  2. 3
      remix-simulator/package.json
  3. 2
      remix-simulator/src/methods/transactions.js
  4. 2
      remix-tests/package.json
  5. 2
      remix-tests/src/compiler.js
  6. 2
      remix-tests/src/index.js
  7. 4
      remix-tests/src/testRunner.js

@ -122,6 +122,7 @@ web3VmProvider.prototype.txProcessed = function (self, data) {
} }
self.txsReceipt[self.processingHash].logs = logs self.txsReceipt[self.processingHash].logs = logs
self.txsReceipt[self.processingHash].transactionHash = self.processingHash self.txsReceipt[self.processingHash].transactionHash = self.processingHash
self.txsReceipt[self.processingHash].status = '0x' + data.vm.exception.toString(16)
if (data.createdAddress) { if (data.createdAddress) {
var address = util.hexConvert(data.createdAddress) var address = util.hexConvert(data.createdAddress)

@ -15,6 +15,7 @@
"main": "./index.js", "main": "./index.js",
"dependencies": { "dependencies": {
"ansi-gray": "^0.1.1", "ansi-gray": "^0.1.1",
"babel-eslint": "^7.1.1",
"babel-plugin-transform-object-assign": "^6.22.0", "babel-plugin-transform-object-assign": "^6.22.0",
"babel-preset-es2017": "^6.24.1", "babel-preset-es2017": "^6.24.1",
"babelify": "^7.3.0", "babelify": "^7.3.0",
@ -23,7 +24,7 @@
"express": "^4.16.3", "express": "^4.16.3",
"fast-async": "^6.3.7", "fast-async": "^6.3.7",
"merge": "^1.2.0", "merge": "^1.2.0",
"remix-lib": "^0.2.5", "remix-lib": "0.3.10",
"standard": "^10.0.3", "standard": "^10.0.3",
"time-stamp": "^2.0.0", "time-stamp": "^2.0.0",
"web3": "1.0.0-beta.27" "web3": "1.0.0-beta.27"

@ -39,7 +39,7 @@ Transactions.prototype.eth_getTransactionReceipt = function (payload, cb) {
'cumulativeGasUsed': '0x06345f', 'cumulativeGasUsed': '0x06345f',
'contractAddress': receipt.contractAddress, 'contractAddress': receipt.contractAddress,
'logs': receipt.logs, 'logs': receipt.logs,
'status': 1 'status': receipt.status
} }
cb(null, r) cb(null, r)

@ -47,7 +47,7 @@
"signale": "^1.2.1", "signale": "^1.2.1",
"solc": "^0.4.24", "solc": "^0.4.24",
"standard": "^10.0.3", "standard": "^10.0.3",
"web3": "1.0.0-beta.34", "web3": "1.0.0-beta.36",
"winston": "^3.0.0" "winston": "^3.0.0"
}, },
"peerDependencies": { "peerDependencies": {

@ -71,7 +71,7 @@ function compileFileOrFiles (filename, isDirectory, opts, cb) {
}) })
} }
function compileContractSources (sources, importFileCb, cb, opts) { function compileContractSources (sources, importFileCb, opts, cb) {
let compiler, filepath let compiler, filepath
let accounts = opts.accounts || [] let accounts = 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.

@ -29,7 +29,7 @@ var runTestSources = function (contractSources, testCallback, resultCallback, fi
}) })
}, },
function compile (next) { function compile (next) {
Compiler.compileContractSources(contractSources, importFileCb, next) Compiler.compileContractSources(contractSources, importFileCb, { accounts }, next)
}, },
function deployAllContracts (compilationResult, next) { function deployAllContracts (compilationResult, next) {
Deployer.deployAll(compilationResult, web3, function (err, contracts) { Deployer.deployAll(compilationResult, web3, function (err, contracts) {

@ -133,8 +133,8 @@ function runTest (testName, testObject, contractDetails, opts, testCallback, res
next(err) next(err)
}) })
} }
}, function () { }, function (error) {
resultsCallback(null, { resultsCallback(error, {
passingNum: passingNum, passingNum: passingNum,
failureNum: failureNum, failureNum: failureNum,
timePassed: timePassed timePassed: timePassed

Loading…
Cancel
Save