Skip to content

Commit 4149560

Browse files
authored
Merge pull request #12446 from ethereum/fix-eslint-warnings-in-external-test-js
Fix ESLint warnings/errors in external test JS
2 parents ef6dd2e + 8cfecb4 commit 4149560

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

test/externalTests/solc-js/determinism.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ const solc = require('../index.js');
44

55
tape('Deterministic Compilation', function (t) {
66
t.test('DAO', function (st) {
7-
var input = {};
8-
var prevBytecode = null;
9-
var testdir = 'test/DAO/';
10-
var files = ['DAO.sol', 'Token.sol', 'TokenCreation.sol', 'ManagedAccount.sol'];
11-
var i;
7+
const input = {};
8+
let prevBytecode = null;
9+
const testdir = 'test/DAO/';
10+
const files = ['DAO.sol', 'Token.sol', 'TokenCreation.sol', 'ManagedAccount.sol'];
11+
let i;
1212
for (i in files) {
13-
var file = files[i];
13+
const file = files[i];
1414
input[file] = { content: fs.readFileSync(testdir + file, 'utf8') };
1515
}
1616
for (i = 0; i < 10; i++) {
17-
var output = JSON.parse(solc.compile(JSON.stringify({
17+
const output = JSON.parse(solc.compile(JSON.stringify({
1818
language: 'Solidity',
1919
settings: {
2020
optimizer: {
2121
enabled: true
2222
},
2323
outputSelection: {
2424
'*': {
25-
'*': [ 'evm.bytecode' ]
25+
'*': ['evm.bytecode']
2626
}
2727
}
2828
},
@@ -31,9 +31,9 @@ tape('Deterministic Compilation', function (t) {
3131
st.ok(output);
3232
st.ok(output.contracts);
3333
st.ok(output.contracts['DAO.sol']);
34-
st.ok(output.contracts['DAO.sol']['DAO']);
35-
st.ok(output.contracts['DAO.sol']['DAO'].evm.bytecode.object);
36-
var bytecode = output.contracts['DAO.sol']['DAO'].evm.bytecode.object;
34+
st.ok(output.contracts['DAO.sol'].DAO);
35+
st.ok(output.contracts['DAO.sol'].DAO.evm.bytecode.object);
36+
const bytecode = output.contracts['DAO.sol'].DAO.evm.bytecode.object;
3737
st.ok(bytecode.length > 0);
3838
if (prevBytecode !== null) {
3939
st.equal(prevBytecode, bytecode);

0 commit comments

Comments
 (0)