-
Notifications
You must be signed in to change notification settings - Fork 5
/
truffle.js
43 lines (40 loc) · 1.08 KB
/
truffle.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
require('babel-register')({
ignore: /node_modules\/(?!openzeppelin-solidity\/test\/helpers)/
});
require('babel-polyfill');
// -------------------------------------------------------------------
// Emulate mocha --grep option to run only matching tests
let mochaConf = {}; // Passed as module.exports.mocha
// -------------------------------------------------------------------
for (let i = 0; i < process.argv.length; i++) {
const arg = process.argv[i];
if (arg != '-g' && arg != "--grep" ) continue;
if (++i >= process.argv.length) {
console.error(arg + " option requires argument");
process.exit(1);
};
mochaConf.grep = new RegExp(process.argv[i]);
break;
}
// -------------------------------------------------------------------
module.exports = {
mocha: mochaConf,
networks: {
development: {
host: "localhost",
port: 9545,
network_id: "*" // Match any network id
},
rinkeby: { // testnet
host: "localhost",
port: 8547,
network_id: 4
},
},
solc: {
optimizer: {
enabled: true,
runs: 200
}
}
};