diff --git a/packages/ethernaut-common/src/test/terminal.js b/packages/ethernaut-common/src/test/terminal.js index 9f3407a..a09db3b 100644 --- a/packages/ethernaut-common/src/test/terminal.js +++ b/packages/ethernaut-common/src/test/terminal.js @@ -28,6 +28,10 @@ class Terminal { async run(command, delay = 10000, killAfter = false) { this.output = '' + // Build the command to call as: + // node nyc node hardhat ...args + // Which is extremely weird, but its the only way I found to guarantee + // proper test coverage with nested processes const n = path.resolve( __dirname, '../../../../', diff --git a/packages/ethernaut-ui/test/tasks/sample.test.js b/packages/ethernaut-ui/test/tasks/sample.test.js index a57e954..3f04110 100644 --- a/packages/ethernaut-ui/test/tasks/sample.test.js +++ b/packages/ethernaut-ui/test/tasks/sample.test.js @@ -7,7 +7,7 @@ describe('sample task', function () { describe('when calling the tasks help', function () { before('call', async function () { - await terminal.run('hardhat sample --help', 1500) + await terminal.run('hardhat sample --help', 2000) }) it('shows Usage', async function () { @@ -21,7 +21,7 @@ describe('sample task', function () { describe('when using --non-interactive', function () { before('call sample without the required value', async function () { - await terminal.run('hardhat sample --non-interactive', 1500) + await terminal.run('hardhat sample --non-interactive', 2000) }) it('prints default-value', async function () { @@ -31,7 +31,7 @@ describe('sample task', function () { describe('when a default value is passed explicitly', function () { before('call', async function () { - await terminal.run('hardhat sample "default-value" --num 42', 1500) + await terminal.run('hardhat sample "default-value" --num 42', 2000) }) it('displays the result', async function () { @@ -41,7 +41,7 @@ describe('sample task', function () { describe('when parameters are passed', function () { before('call', async function () { - await terminal.run('hardhat sample poop --num 42', 1500) + await terminal.run('hardhat sample poop --num 42', 2000) }) it('displays the result', async function () { @@ -51,7 +51,7 @@ describe('sample task', function () { describe('when the user enters an invalid number', function () { before('call', async function () { - await terminal.run('hardhat sample poop', 1500) + await terminal.run('hardhat sample poop', 2000) }) it('Asks for num with default value', async function () {