Skip to content

Commit

Permalink
tests: skip for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
snitin315 committed Oct 4, 2020
1 parent 42dfe71 commit d7efed3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
26 changes: 14 additions & 12 deletions test/analyze/analyze-flag.test.js
@@ -1,18 +1,20 @@
'use strict';

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

describe('--analyze flag', () => {
it('should load webpack-bundle-analyzer plugin with --analyze flag', async () => {
const { stderr, stdout } = await runWatch({
testCase: __dirname,
args: ['--analyze'],
setOutput: true,
outputKillStr: 'main',
});
if (!isWindows) {
it('should load webpack-bundle-analyzer plugin with --analyze flag', async () => {
const { stderr, stdout } = await runWatch({
testCase: __dirname,
args: ['--analyze'],
setOutput: true,
outputKillStr: 'main',
});

expect(stderr).toBeFalsy();
expect(stdout).toContain('BundleAnalyzerPlugin');
expect(stdout).toContain('Webpack Bundle Analyzer is started at http://127.0.0.1:8888');
}, 600000);
expect(stderr).toBeFalsy();
expect(stdout).toContain('BundleAnalyzerPlugin');
expect(stdout).toContain('Webpack Bundle Analyzer is started at http://127.0.0.1:8888');
});
}
});
3 changes: 3 additions & 0 deletions test/utils/test-utils.js
Expand Up @@ -244,6 +244,8 @@ const hyphenToUpperCase = (name) => {
});
};

const isWindows = process.platform === 'win32';

module.exports = {
run,
runWatch,
Expand All @@ -256,4 +258,5 @@ module.exports = {
runInfo,
hyphenToUpperCase,
isWebpack5,
isWindows,
};

0 comments on commit d7efed3

Please sign in to comment.