-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest.js
More file actions
31 lines (23 loc) · 725 Bytes
/
test.js
File metadata and controls
31 lines (23 loc) · 725 Bytes
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
const child_process = require("child_process")
const util = require("util")
const exec = util.promisify(child_process.exec)
function sleep(ms) {
return new Promise((resolve) => setTimeout(resolve, ms))
}
async function main() {
console.log(`Running mainnet tests...`)
// this will be expaned to list of files
// test/mainnet/**/test-*.ts
const files = process.argv.slice(2)
for (const file of files) {
console.log(file)
// test //
// NOTE: test failures are printed to stdout, exit code = 0
const { stdout } = await exec(`npx truffle --network mainnet_fork test ${file}`)
console.log(stdout)
// sleep
console.log(`sleeping 60 secs...`)
await sleep(60 * 1000)
}
}
main()