Skip to content

Commit

Permalink
tests: fix
Browse files Browse the repository at this point in the history
  • Loading branch information
anshumanv committed Nov 11, 2020
1 parent 713e377 commit e28087c
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions test/colors/colors-false.webpack.config.js
Expand Up @@ -2,4 +2,5 @@ module.exports = {
stats: {
colors: false,
},
mode: 'production',
};
1 change: 1 addition & 0 deletions test/colors/colors-true.webpack.config.js
Expand Up @@ -2,4 +2,5 @@ module.exports = {
stats: {
colors: true,
},
mode: 'production',
};
2 changes: 2 additions & 0 deletions test/colors/multiple-configs.js
Expand Up @@ -3,10 +3,12 @@ module.exports = [
name: 'first-config',
entry: './src/first.js',
stats: 'normal',
mode: 'production',
},
{
name: 'second-config',
entry: './src/second.js',
stats: 'normal',
mode: 'production',
},
];
1 change: 1 addition & 0 deletions test/colors/no-stats.webpack.config.js
@@ -1,3 +1,4 @@
module.exports = {
name: 'test',
mode: 'production',
};
1 change: 1 addition & 0 deletions test/colors/stats-boolean.webpack.config.js
@@ -1,3 +1,4 @@
module.exports = {
stats: true,
mode: 'production',
};
1 change: 1 addition & 0 deletions test/colors/stats-string.webpack.config.js
@@ -1,3 +1,4 @@
module.exports = {
stats: 'verbose',
mode: 'production',
};
3 changes: 3 additions & 0 deletions test/colors/webpack.config.js
@@ -0,0 +1,3 @@
module.exports = {
mode: 'production',
};
4 changes: 2 additions & 2 deletions test/watch/watch-flag.test.js
Expand Up @@ -10,7 +10,7 @@ const wordsInStatsv5 = ['asset', 'index.js', 'compiled successfully'];

describe('--watch flag', () => {
it('should recompile upon file change', (done) => {
const proc = runAndGetWatchProc(__dirname, ['--watch'], false, '', true);
const proc = runAndGetWatchProc(__dirname, ['--watch', '--mode', 'production'], false, '', true);
let semaphore = 0;
proc.stdout.on('data', (chunk) => {
const data = stripAnsi(chunk.toString());
Expand Down Expand Up @@ -45,7 +45,7 @@ describe('--watch flag', () => {
});

it('should print compilation lifecycle', (done) => {
const proc = runAndGetWatchProc(__dirname, ['--watch'], false, '', true);
const proc = runAndGetWatchProc(__dirname, ['--watch', '--mode', 'production'], false, '', true);
let semaphore = 0;
proc.stdout.on('data', (chunk) => {
const data = stripAnsi(chunk.toString());
Expand Down

0 comments on commit e28087c

Please sign in to comment.