iotaledger / iota-sdk

The IOTA SDK provides developers with a seamless experience to develop on IOTA by providing account abstractions and clients to interact with node APIs.
Apache License 2.0
58 stars 42 forks source link

Write tests to ensure examples are working #110

Open Tuditi opened 2 years ago

Tuditi commented 2 years ago

Task description

Currently, not all examples are running. This gives a window of opportunity to write tests to see if the bindings work correctly. And to experiment with a mocking framework.

Requirements

Tests:

Acceptance criteria

TBD

Creation checklist

tuddman commented 2 years ago
[Cargo.toml]
iota-wallet = { git = "https://github.com/iotaledger/wallet.rs", branch = "develop" }

I am trying to run the examples, or rather use the examples as the basis for making an application that uses wallet.rs.

Now I'm getting this error: ClientError(Json(Error("missing field 'nodeinfo'", line: 1, column: 887))) when my application hits this line

tracing back to this JSON error in iota.rs?

➕ for having automated test coverage to ensure all of the examples continue to work. It is what the community relies on to use this library in building IOTA applications. Its also a good way and common in the rust community to verify the interface contract for using the library hasn't broken in subtle ways.