Browse Source

Working coverage config

maurelian 6 years ago
parent
commit
779d0ac6b4
4 changed files with 2701 additions and 9 deletions
  1. 11 0
      .solcover.js
  2. 2678 6
      package-lock.json
  3. 4 2
      package.json
  4. 8 1
      truffle.js

+ 11 - 0
.solcover.js

@@ -0,0 +1,11 @@
+module.exports = {
+    compileCommand: '../node_modules/.bin/truffle compile',
+    testCommand: '../node_modules/.bin/truffle test --network coverage',
+    // port: 6545,
+    // testrpcOptions: '-p 6545 -u 0x54fd80d6ae7584d8e9a19fe1df43f04e5282cc43',
+    // testCommand: 'mocha --timeout 5000',
+    // norpc: true,
+    // dir: './secretDirectory',
+    // copyPackages: ['zeppelin-solidity'],
+    // skipFiles: ['Routers/EtherRouter.sol']
+};

File diff suppressed because it is too large
+ 2678 - 6
package-lock.json


+ 4 - 2
package.json

@@ -14,7 +14,8 @@
     "lint": "npm run lint:js && npm run lint:sol",
     "publish": "truffle publish",
     "pretest": "npm run lint",
-    "test": "truffle test"
+    "test": "truffle test",
+    "coverage": "solidity-coverage"
   },
   "repository": {
     "type": "git",
@@ -44,6 +45,7 @@
     "eslint-plugin-mocha": "4.11.0",
     "eslint-plugin-node": "5.1.0",
     "eslint-plugin-react": "7.5.1",
-    "solhint": "1.1.9"
+    "solhint": "1.1.9",
+    "solidity-coverage": "0.4.9"
   }
 }

+ 8 - 1
truffle.js

@@ -30,6 +30,13 @@ module.exports = {
     },
     testrpc: {
       network_id: 'default'
-    }
+    },
+    coverage: {
+      host: "localhost",
+      network_id: "*",
+      port: 8555,        
+      gas: 0xfffffffffff,
+      gasPrice: 0x01     
+    },
   }
 }