-
-
Notifications
You must be signed in to change notification settings - Fork 622
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: add --analyze flag * fix: conlicts * tests: updates * chore: suggesion * fix: ci
- Loading branch information
Showing
11 changed files
with
160 additions
and
17 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
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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
const { runWatch, isWindows } = require('../utils/test-utils'); | ||
|
||
describe('--analyze flag', () => { | ||
// TODO: fix timeout for windows CI | ||
if (isWindows) { | ||
it('TODO: Fix on windows', () => { | ||
expect(true).toBe(true); | ||
}); | ||
return; | ||
} | ||
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'); | ||
}); | ||
}); |
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 |
---|---|---|
@@ -0,0 +1 @@ | ||
console.log('webpack-bundle-analyzer is installed'); |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
const WebpackCLITestPlugin = require('../utils/webpack-cli-test-plugin'); | ||
|
||
module.exports = { | ||
mode: 'development', | ||
entry: './main.js', | ||
plugins: [new WebpackCLITestPlugin(['plugins'], false)], | ||
}; |
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
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