New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get all files over 80% test coverage #3716
Comments
I'm currently working on adding tests for |
Wouldn't it be better to update the syntax of these, first? |
@wtgtybhertgeghgtwtg Adding tests should be independent of any syntax changes (so they can be done in parallel). If the question is related to effort, then we'd need to elaborate on "better" - is updating the syntax a higher priority than adding tests, and if so, why? |
Syntax change tends to alter coverage, usually negatively. But you're right, testing should probably be done before syntax change. |
I'm currently working on adding tests for |
Working on |
If you're looking at the low coverage top 10 on coveralls for the latest build, you'll notice two new files <80% coverage that have snuck in. I've got those covered in PR #3839, so the 6 left above are still the ones to tackle next. |
@jtinfors Thanks - one more struck off the list! 🎉 |
I'm currently working on adding tests for |
Note about the |
If you're looking at the low coverage top 10 on coveralls for the latest build, you'll notice |
Hello I'm relatively new to this but I am handling |
@li-kai Awesome, thanks! Give me a poke it you need any help with it 👍 |
If you're looking at the low coverage top 10 on coveralls for the latest build, you'll notice two new files with <80% coverage. Tests for these two are covered in PRs #3982 and #3983. |
I can tackle lib/node/NodeMainTemplatePlugin.js, if that's alright. Just in the webpack groove :) |
@jure Awesome, thanks for grabbing that and putting a PR up 👍 |
examples/move-to-parent/webpack.config.js is done! 😄 |
@jerairrest Awesome, thanks! Ticked off the list above 🎉 |
@li-kai How are you getting on with testing |
I attempted to write a unit test for ContextReplacementPlugin.js but I couldn't wrap my head around it. Is there file similar that I could use as an example? |
@alistairjcbrown I'm getting there! School work caught up for a bit, but the PR will be coming in a day or two. |
@li-kai No worries, I see there's been a PR up and merged 🎉 - nice work! |
Hi @jerairrest - it looks like some of the complexity in testing the |
@alistairjcbrown Perfect I'll get crackin' on it. |
I've opened a PR adding a couple of EnvironmentPlugin tests :) |
@fedebertolini Awesome, thanks! I've updated the description 🎉 |
I'll pick up the last outstanding file for tests, For anyone looking at this issue and not sure how to contribute, the next plan is to move on and try and get all files up to 85% test coverage (~12 files), so don't be afraid to take a look at the coverage percentages on coveralls and grab one of the files with only ~80% coverage! |
@alistairjcbrown I took a look at Apparently Should I go ahead an open a PR removing that function? |
@fedebertolini I guess that explains why there's no coverage of that function, if it's not being used! |
PR for ContextReplacementPlugin is in! #4319 |
@alistairjcbrown This issue can probably be resolved now. :) |
There are files which are 80% or under for test coverage on Coveralls, giving them a red label. Providing these files with dedicated unit tests will help solidify their API, as well as bring their coverage up to 100%.
Please see the coverall coverage report: https://coveralls.io/github/webpack/webpack
This issue aims to help co-ordinate any effort to add unit test for these files, with the aim then have all files with higher than 80% coverage when closed off.
(65.73%)- Mergedlib/MultiCompiler.js
- Add tests for MultiCompiler #3802(70.45%)- Mergedlib/LibraryTemplatePlugin.js
- Add tests for LibraryTemplatePlugin #3835(74.19%)- Mergedlib/optimize/UglifyJsPlugin.js
- Add test for UglifyJsPlugin #4127(75.00%)- Mergedlib/webworker/WebWorkerMainTemplatePlugin.js
- Add tests for WebWorkerMainTemplatePlugin #3866(75.00%)- Mergedexamples/move-to-parent/webpack.config.js
- changed example to made coverage pass. It also seemed like the common… #4092(75.93%)- Mergedlib/node/NodeMainTemplatePlugin.js
- Add more tests for lib/node/NodeMainTemplatePlugin.js #3999(79.49%)- Mergedlib/node/NodeWatchFileSystem.js
- Bump up test coverage on NodeWatchFileSystem test #3837(80.00%)- Mergedlib/HotUpdateChunkTemplate.js
- Add tests for HotUpdateChunkTemplate #3867lib/ContextReplacementPlugin.js
lib/dependencies/ContextDependencyTemplateAsId.js
- Add tests for ContextDependencyTemplateAsId #4203(80.00%)- Mergedlib/EnvironmentPlugin.js
- Test - improve EnvironmentPlugin code coverage #4201Add a comment below if you're adding unit tests for one of the files above to prevent duplication of effort, and then link to the PR once it's up.
The text was updated successfully, but these errors were encountered: