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:
@ -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);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user