update remix-core tests

pull/7/head
Iuri Matias 6 years ago
parent 7aa65f8611
commit ac18b5d61b
  1. 2
      remix-core/test/codeManager.js
  2. 10
      remix-core/test/traceManager.js

@ -19,7 +19,7 @@ tape('CodeManager', function (t) {
t.fail(mes)
} else {
web3 = obj
var traceManager = new TraceManager()
var traceManager = new TraceManager({web3: web3})
codeManager = new CodeManager(traceManager)
var contractCode = web3.eth.getCode('0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5')
codeManager.codeResolver.cacheExecutingCode('0x0d3a18d64dfe4f927832ab58d6451cecc4e517c5', contractCode) // so a call to web3 is not necessary

@ -3,9 +3,10 @@ var TraceManager = require('../src/trace/traceManager')
var tape = require('tape')
var remixLib = require('remix-lib')
var Web3Providers = remixLib.vm.Web3Providers
var global = remixLib.global
var web3Test = require('./resources/testWeb3')
let web3 = null
tape('TraceManager', function (t) {
var traceManager
@ -18,16 +19,15 @@ tape('TraceManager', function (t) {
console.log(mes)
st.fail(mes)
} else {
global.web3 = obj
global.web3Debug = obj
traceManager = new TraceManager()
web3 = obj
traceManager = new TraceManager({web3: web3})
st.end()
}
})
})
t.test('TraceManager.resolveTrace', function (st) {
var tx = global.web3.eth.getTransaction('0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51')
var tx = web3.eth.getTransaction('0x20ef65b8b186ca942fcccd634f37074dde49b541c27994fc7596740ef44cfd51')
traceManager.resolveTrace(tx, function (error, result) {
if (error) {
st.fail(' - traceManager.resolveTrace - failed ' + result)

Loading…
Cancel
Save