Prefer const in test files (#1117)

* Removed all instances of var.

* Sorted eslintrc rules.

* Made eslint rule severity explicit.

* Now prefering const over let.
This commit is contained in:
Nicolás Venturo
2018-07-26 13:25:10 -03:00
committed by GitHub
parent 6e19ed47be
commit 567b773242
31 changed files with 171 additions and 176 deletions

View File

@ -1,6 +1,6 @@
const { assertRevert } = require('../helpers/assertRevert');
var Claimable = artifacts.require('Claimable');
const Claimable = artifacts.require('Claimable');
contract('Claimable', function (accounts) {
let claimable;
@ -10,14 +10,14 @@ contract('Claimable', function (accounts) {
});
it('should have an owner', async function () {
let owner = await claimable.owner();
const owner = await claimable.owner();
assert.isTrue(owner !== 0);
});
it('changes pendingOwner after transfer', async function () {
let newOwner = accounts[1];
const newOwner = accounts[1];
await claimable.transferOwnership(newOwner);
let pendingOwner = await claimable.pendingOwner();
const pendingOwner = await claimable.pendingOwner();
assert.isTrue(pendingOwner === newOwner);
});
@ -44,7 +44,7 @@ contract('Claimable', function (accounts) {
it('changes allow pending owner to claim ownership', async function () {
await claimable.claimOwnership({ from: newOwner });
let owner = await claimable.owner();
const owner = await claimable.owner();
assert.isTrue(owner === newOwner);
});