michikoid-web3-mocha-ui

0.1.2 • Public • Published

web3-mocha-ui

TDD ui for mocha js, extrended for use with smart contracts and web3.

Reason for this to exist: There are several implementations of mocha and ethereum around. Its a obvious and simple choice for the JSON rpc API. The test frameworks are mostly bundled with frameworks. So this aims to the purist.

Install

npm install michikoid-web3-mocha-ui --save

Usage

The TDD and BDD style syntax is available. There are some extra methods available:

  • getWeb3() - gives you a configured web3 object
  • snapshot(fn) - creates a snapshot on testrpc
  • restore(id, fn) - restores a snapshot
  • getSnapshotIds() - get all snapshot ids as array

Design Rationale

  • this provides no deployment infrastructure
  • delivers pure web3 objects
  • goal: fast integration testing with testrpc

Package Sidebar

Install

npm i michikoid-web3-mocha-ui

Weekly Downloads

1

Version

0.1.2

License

MIT

Last publish

Collaborators

  • sebs