Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 1001 Bytes

README.md

File metadata and controls

57 lines (36 loc) · 1001 Bytes

chai-web3-bindings

Web3 bindings for chai

Install

Install with npm

$ npm i chai-web3-bindings --save-dev

Usage

const chai = require('chai')
chai.use(require('chai-web3-bindings'))

hex

expect('0x000').to.be.hex()

address

expect(web3.eth.account).to.be.an.address()

zeros

expect('0x0000').to.be.zeros()

contract

expect(web3.eth.contract(abi)).to.be.a.contract()

ascii

expect('0x74657374').to.be.ascii('test')

bytes

expect('0x74657374').to.be.bytes(4)

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue

License

Copyright © 2016 Licensed under the MIT license.


This file was generated by readme-generator on November 05, 2016.