Skip to content

Commit

Permalink
test(cli): use ports map for quiet logging test (#2247)
Browse files Browse the repository at this point in the history
  • Loading branch information
knagaitsev authored and evilebottnawi committed Sep 16, 2019
1 parent 00903f6 commit 090b184
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/cli/cli.test.js
Expand Up @@ -4,6 +4,7 @@ const { unlink } = require('fs');
const { join, resolve } = require('path');
const execa = require('execa');
const testBin = require('../helpers/test-bin');
const port1 = require('../ports-map').cli[0];

const httpsCertificateDirectory = resolve(
__dirname,
Expand All @@ -30,11 +31,11 @@ describe('CLI', () => {
});

it('--quiet', async (done) => {
const output = await testBin('--quiet');
const output = await testBin(`--quiet --port ${port1}`);
expect(output.code).toEqual(0);
expect(output.stdout.split('\n').length === 3).toBe(true);
expect(
output.stdout.includes('Project is running at http://localhost:8080/')
output.stdout.includes(`Project is running at http://localhost:${port1}/`)
).toBe(true);
expect(output.stdout.includes('webpack output is served from /')).toBe(
true
Expand Down

0 comments on commit 090b184

Please sign in to comment.