Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .solcover.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const package = require("./package.json");
const shell = require("shelljs");
const utils = require("solidity-coverage/plugins/resources/truffle.utils");

module.exports = {
port: 8545,
skipFiles: ["mcd", "interfaces"],
client: require("ganache-cli"),
providerOptions: {
network_id: package.config.ganacheNetworkID,
default_balance_ether: package.config.etherBalance,
mnemonic: package.config.mnemonic
},
onServerReady: function() {
shell.exec("rm -rf build");
},
onCompileComplete: async function(config) {
shell.exec("yarn gen:contract-typings");
shell.exec("tsc -b");

// Work arounds
config.test_files = await utils.getTestFilePaths(config);
process.env.npm_package_config_mnemonic = package.config.mnemonic;
}
};
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"gen:contract-typings": "rm -f typings/contracts/* && typechain --target ethers --outDir typings/contracts './build/contracts/*.json'",
"start": "./node_modules/.bin/ganache-cli --gasLimit 10000000 -e 10000 2>&1 > ganache-output.log & echo 'local chain started.'",
"test": "tsc -b && truffle test --network ganache build/*.spec.js",
"coverage": "truffle run coverage --temp build --file='./build/*.spec.js'",
"stop": "kill -9 \"$(ps -ax | grep -m1 '[n]ode ./node_modules/.bin/ganache-cli' | awk '{print $1;}')\" && echo 'local chain stopped.'",
"prettier": "prettier --write"
},
Expand Down