Skip to content

Commit

Permalink
test: add watch
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed Mar 27, 2021
1 parent 991a43e commit c6134cd
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/build/start-finish-force-log/start-finish-force-log.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';

const { run } = require('../../utils/test-utils');
const { run, runWatch } = require('../../utils/test-utils');

describe('start finish force log', () => {
it('start finish force log when env is set', () => {
Expand All @@ -23,6 +23,15 @@ describe('start finish force log', () => {
expect(stdout).toBeTruthy();
});

it('should work with watch', async () => {
const { stderr, stdout } = await runWatch(__dirname, ['watch'], {
env: { WEBPACK_CLI_START_FINISH_FORCE_LOG: true },
});
expect(stderr).toContain('Compiler starting...');
expect(stderr).toContain('Compiler finished');
expect(stdout).toBeTruthy();
});

it('should work with multi compiler', () => {
const { exitCode, stderr, stdout } = run(__dirname, ['--config', './webpack.config.array.js'], {
env: { WEBPACK_CLI_START_FINISH_FORCE_LOG: true },
Expand Down

0 comments on commit c6134cd

Please sign in to comment.