-
Notifications
You must be signed in to change notification settings - Fork 341
/
Copy path.solcover.js
35 lines (31 loc) · 1.01 KB
/
.solcover.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
const fs = require('fs');
const path = require('path');
const mv = require('mv');
const previousArtifactsPath = path.join(__dirname, '.coverageArtifacts');
const targetArtifactPath = path.join(__dirname, '.coverage_artifacts');
function moveFiles(config) {
fs.readdir(previousArtifactsPath, (err, files) => {
if (err) console.log(err);
files.forEach(file => {
mv(path.join(previousArtifactsPath, file), path.join(targetArtifactPath, file), err => {
if (err) throw err;
console.log(`Moving ` + file);
});
})
})
}
function removeArtifactsDir(config) {
fs.rmdir(previousArtifactsPath, err => {
if (err) console.log(err);
})
}
module.exports = {
providerOptions: {
"default_balance_ether": 100000000000000,
"total_accounts": 20
},
skipFiles: ['Dao/mock/', 'mock/', 'utils/zeppelin/'],
istanbulReporter: ['html','json'],
onCompileComplete: moveFiles,
onIstanbulComplete: removeArtifactsDir
}