Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(cli): use ports map for quiet logging test #2247

Merged
merged 3 commits into from Sep 16, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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