Skip to content

Commit

Permalink
align logout test removing the delay function
Browse files Browse the repository at this point in the history
  • Loading branch information
hugomontero committed Oct 10, 2024
1 parent 9a37e99 commit 0b6afce
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/e2e/logout.e2e.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
const { expect } = require('../setup');
const { delay } = require('../lib/mocha-utils');
const cli = require('../lib/cli');
const { USERNAME } = require('../lib/env');

Expand Down Expand Up @@ -40,12 +39,9 @@ describe('Logout Commands', () => {
});

it('Signs out', async () => {
const subprocess = cli.run(['logout']);
await delay(2000);
const { stdout, stderr, exitCode } = await cli.run(['logout']);

const { stdout, stderr, exitCode } = await subprocess;

expect(stdout, `err: ${stderr}; exit: ${exitCode}`).to.include(`You have been logged out from ${USERNAME}`);
expect(stdout).to.include(`You have been logged out from ${USERNAME}`);
expect(stderr).to.equal('');
expect(exitCode).to.equal(0);
});
Expand Down

0 comments on commit 0b6afce

Please sign in to comment.