feat: apply eslint --fix across project

This commit is contained in:
Matt Condon
2017-11-24 14:31:52 +02:00
parent 6ea0577bfe
commit 8662846838
53 changed files with 1692 additions and 807 deletions

View File

@ -1,21 +1,21 @@
'use strict';
const assertRevert = require('./helpers/assertRevert');
var Claimable = artifacts.require('../contracts/ownership/Claimable.sol');
contract('Claimable', function(accounts) {
contract('Claimable', function (accounts) {
let claimable;
beforeEach(async function() {
beforeEach(async function () {
claimable = await Claimable.new();
});
it('should have an owner', async function() {
it('should have an owner', async function () {
let owner = await claimable.owner();
assert.isTrue(owner !== 0);
});
it('changes pendingOwner after transfer', async function() {
it('changes pendingOwner after transfer', async function () {
let newOwner = accounts[1];
await claimable.transferOwnership(newOwner);
let pendingOwner = await claimable.pendingOwner();
@ -23,23 +23,23 @@ contract('Claimable', function(accounts) {
assert.isTrue(pendingOwner === newOwner);
});
it('should prevent to claimOwnership from no pendingOwner', async function() {
it('should prevent to claimOwnership from no pendingOwner', async function () {
try {
await claimable.claimOwnership({from: accounts[2]});
await claimable.claimOwnership({ from: accounts[2] });
assert.fail('should have thrown before');
} catch(error) {
} catch (error) {
assertRevert(error);
}
});
it('should prevent non-owners from transfering', async function() {
it('should prevent non-owners from transfering', async function () {
const other = accounts[2];
const owner = await claimable.owner.call();
assert.isTrue(owner !== other);
try {
await claimable.transferOwnership(other, {from: other});
await claimable.transferOwnership(other, { from: other });
assert.fail('should have thrown before');
} catch(error) {
} catch (error) {
assertRevert(error);
}
});
@ -52,8 +52,8 @@ contract('Claimable', function(accounts) {
await claimable.transferOwnership(newOwner);
});
it('changes allow pending owner to claim ownership', async function() {
await claimable.claimOwnership({from: newOwner});
it('changes allow pending owner to claim ownership', async function () {
await claimable.claimOwnership({ from: newOwner });
let owner = await claimable.owner();
assert.isTrue(owner === newOwner);