Merge pull request #97 from sc-forks/lint-022

Lint
pull/100/head
c-g-e-w-e-k-e- 7 years ago committed by GitHub
commit 7c0a6e9ee3
  1. 1
      .eslintrc
  2. 10
      test/app.js
  3. 1
      test/assert.js
  4. 1
      test/return.js
  5. 1
      test/util/util.js
  6. 2
      test/util/vm.js
  7. 1
      test/zeppelin.js

@ -32,6 +32,7 @@
"objectsInObjects": false,
"arraysInObjects": false
}],
"no-unused-expressions": ["error", { "allowShortCircuit": true, "allowTernary": true }],
"object-curly-newline": ["error", { "minProperties": 1 }],
"object-property-newline": ["error"],
"prefer-template": [0],

@ -60,7 +60,7 @@ describe('app', () => {
const testConfig = Object.assign({}, config);
testConfig.testrpcOptions = `--account="${privateKey},${balance}" --port 8777`;
testConfig.dir = './mock',
testConfig.dir = './mock';
testConfig.norpc = false;
testConfig.port = 8777;
@ -79,7 +79,7 @@ describe('app', () => {
const testConfig = Object.assign({}, config);
testConfig.testCommand = 'mocha --timeout 5000 > /dev/null 2>&1';
testConfig.dir = './mock',
testConfig.dir = './mock';
testConfig.norpc = false;
testConfig.port = 8888;
@ -98,7 +98,7 @@ describe('app', () => {
const testConfig = Object.assign({}, config);
testConfig.testCommand = 'node ../test/util/mockTestCommand.js';
testConfig.dir = './mock',
testConfig.dir = './mock';
testConfig.norpc = false;
testConfig.port = 8888;
@ -118,7 +118,7 @@ describe('app', () => {
const testConfig = Object.assign({}, config);
testConfig.dir = './mock',
testConfig.dir = './mock';
testConfig.norpc = false;
testConfig.port = 8889;
@ -159,7 +159,7 @@ describe('app', () => {
};`;
const testConfig = Object.assign({}, config);
testConfig.dir = './mock',
testConfig.dir = './mock';
testConfig.norpc = false;
testConfig.port = 8555; // Manually inspect that port is actually set to 8999

@ -106,5 +106,4 @@ describe('asserts and requires', () => {
done();
}).catch(done);
});
});

@ -5,7 +5,6 @@ const getInstrumentedVersion = require('./../lib/instrumentSolidity.js');
const util = require('./util/util.js');
describe('return statements', () => {
it('should compile after instrumenting function that returns true', () => {
const contract = util.getCode('return/return.sol');
const info = getInstrumentedVersion(contract, 'test.sol');

@ -11,7 +11,6 @@ module.exports.getCode = function getCode(_path) {
};
module.exports.report = function report(errors) {
if (errors) {
errors.forEach(error => {
if (error.indexOf('Warning') === -1) {

@ -123,7 +123,7 @@ function callMethod(vm, abi, address, functionName, args) {
events.pop();
shell.rm('./allFiredEvents');
resolve(events);
} catch (err) {
} catch (e) {
resolve([]);
}
});

@ -5,7 +5,6 @@ const getInstrumentedVersion = require('./../lib/instrumentSolidity.js');
const util = require('./util/util.js');
describe('Battery test of production contracts: OpenZeppelin', () => {
it('should compile after instrumenting zeppelin-solidity/Bounty.sol', () => {
const bounty = getInstrumentedVersion(util.getCode('zeppelin/Bounty.sol'), 'Bounty.sol');
const ownable = getInstrumentedVersion(util.getCode('zeppelin/Ownable.sol'), 'Ownable.sol');

Loading…
Cancel
Save