Skip to content

Commit

Permalink
ci
Browse files Browse the repository at this point in the history
  • Loading branch information
eternauta1337 committed Apr 3, 2024
1 parent f9f974e commit bd330db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 4 additions & 0 deletions packages/ethernaut-common/src/test/terminal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
'../../../../',
Expand Down
10 changes: 5 additions & 5 deletions packages/ethernaut-ui/test/tasks/sample.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 () {
Expand All @@ -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 () {
Expand All @@ -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 () {
Expand All @@ -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 () {
Expand All @@ -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 () {
Expand Down

0 comments on commit bd330db

Please sign in to comment.