Files
openzeppelin-contracts/test/helpers/test/ether.test.js
Nicolás Venturo f0e12d5301 ether and shouldFail tests (#1513)
* Added ether tests.

* Added shouldFail base function and tests.

* Updated test descriptions.

* Reduced gas limit on out-of-gas tests.
2018-11-27 17:20:21 -03:00

17 lines
462 B
JavaScript

const { ether } = require('../ether');
const BigNumber = web3.BigNumber;
require('chai')
.use(require('chai-bignumber')(BigNumber))
.should();
describe('ether', function () {
it('returns a BigNumber', function () {
ether(1, 'ether').should.be.bignumber.equal(new BigNumber(1000000000000000000));
});
it('works with negative amounts', function () {
ether(-1, 'ether').should.be.bignumber.equal(new BigNumber(-1000000000000000000));
});
});