Closed ibmamnt closed 5 years ago
I had exactly the same problem, would be very great ! for example if we try to .toString() on the response returned by getState(key) of undefined it throw an error, in order to work we need to add additional if statement to avoid doing operation on undefined variable
First of all, thank you for this project. This enabled us to run chaincode test in a CI way.
I found that MockStub.getState(key) returns 'undefined' rather than empty bytes which actual node.js chaincode shim returns (as of v1.2.3). I've already included to check for empty bytes in my chaincode. If it is possible, please return empty bytes when the key does not exists in the State.