You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
437 B
16 lines
437 B
/* eslint-env node, mocha */
|
|
/* global artifacts, contract, assert */
|
|
|
|
const Simple = artifacts.require('./Simple.sol');
|
|
|
|
contract('Simple', () => {
|
|
it('should set x to 5', () => {
|
|
let simple;
|
|
return Simple.deployed().then(instance => {
|
|
simple = instance;
|
|
return simple.test(5);
|
|
})
|
|
.then(() => simple.getX.call())
|
|
.then(val => assert.equal(val.toNumber(), 4)); // <-- Wrong result: test fails
|
|
});
|
|
});
|
|
|