Skip to main content
code
Source Link
NaN
  • 194
  • 7

Get each variable value fromBasically the result inside an object andit gives you back is truffle, you can either use explode to compare thatthe result with expected in terms or object with values/array. But you access the result like the following -

basecontract.getInfo("1",function(error,data){
            // data returns a tuple  
            var rowdata = data.toString().split(',')

            // you can access the values through array rowdata[0]
            // do the comparison
               
          })

Get each variable value from the result inside an object and compare that with expected object with values

Basically the result it gives you back is truffle, you can either use explode to compare the result with expected in terms or object/array. But you access the result like the following -

basecontract.getInfo("1",function(error,data){
            // data returns a tuple  
            var rowdata = data.toString().split(',')

            // you can access the values through array rowdata[0]
            // do the comparison
               
          })
Source Link
NaN
  • 194
  • 7

Get each variable value from the result inside an object and compare that with expected object with values