Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
17 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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'); | ||
}); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters