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,4 +1,4 @@
var Contactable = artifacts.require('Contactable');
const Contactable = artifacts.require('Contactable');
contract('Contactable', function (accounts) {
let contactable;
@ -8,19 +8,19 @@ contract('Contactable', function (accounts) {
});
it('should have an empty contact info', async function () {
let info = await contactable.contactInformation();
const info = await contactable.contactInformation();
assert.isTrue(info === '');
});
describe('after setting the contact information', function () {
let contactInfo = 'contact information';
const contactInfo = 'contact information';
beforeEach(async function () {
await contactable.setContactInformation(contactInfo);
});
it('should return the setted contact information', async function () {
let info = await contactable.contactInformation();
const info = await contactable.contactInformation();
assert.isTrue(info === contactInfo);
});
});