|
|
|
@ -243,7 +243,14 @@ module.exports = { |
|
|
|
|
done() |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
}
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
'Should install slither #group10 #flaky': function (browser: NightwatchBrowser) { |
|
|
|
|
browser.perform(async (done) => { |
|
|
|
|
await installSlither() |
|
|
|
|
done() |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function runTests(browser: NightwatchBrowser, done: any) { |
|
|
|
@ -477,3 +484,27 @@ async function buildFoundryProject(): Promise<void> { |
|
|
|
|
console.log(e) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
async function installSlither(): Promise<void> { |
|
|
|
|
console.log('installSlither', process.cwd()) |
|
|
|
|
try { |
|
|
|
|
const server = spawn('node', ['./dist/libs/remixd/src/scripts/installSlither.js'], { cwd: process.cwd(), shell: true, detached: true }) |
|
|
|
|
return new Promise((resolve, reject) => { |
|
|
|
|
server.stdout.on('data', function (data) { |
|
|
|
|
console.log(data.toString()) |
|
|
|
|
if ( |
|
|
|
|
data.toString().includes("Slither is ready to use") |
|
|
|
|
) { |
|
|
|
|
console.log('resolving') |
|
|
|
|
resolve() |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
server.stderr.on('err', function (data) { |
|
|
|
|
console.log(data.toString()) |
|
|
|
|
reject(data.toString()) |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} catch (e) { |
|
|
|
|
console.log(e) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|