Skip to content

Commit 090b184

Browse files
knagaitsevevilebottnawi
authored andcommitted
test(cli): use ports map for quiet logging test (#2247)
1 parent 00903f6 commit 090b184

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/cli/cli.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const { unlink } = require('fs');
44
const { join, resolve } = require('path');
55
const execa = require('execa');
66
const testBin = require('../helpers/test-bin');
7+
const port1 = require('../ports-map').cli[0];
78

89
const httpsCertificateDirectory = resolve(
910
__dirname,
@@ -30,11 +31,11 @@ describe('CLI', () => {
3031
});
3132

3233
it('--quiet', async (done) => {
33-
const output = await testBin('--quiet');
34+
const output = await testBin(`--quiet --port ${port1}`);
3435
expect(output.code).toEqual(0);
3536
expect(output.stdout.split('\n').length === 3).toBe(true);
3637
expect(
37-
output.stdout.includes('Project is running at http://localhost:8080/')
38+
output.stdout.includes(`Project is running at http://localhost:${port1}/`)
3839
).toBe(true);
3940
expect(output.stdout.includes('webpack output is served from /')).toBe(
4041
true

0 commit comments

Comments
 (0)