-
-
Notifications
You must be signed in to change notification settings - Fork 376
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
chore(utils): add getPaths helper as separate util #674
Conversation
Codecov Report
@@ Coverage Diff @@
## master #674 +/- ##
=======================================
Coverage 99.11% 99.12%
=======================================
Files 8 9 +1
Lines 227 228 +1
Branches 70 70
=======================================
+ Hits 225 226 +1
Misses 2 2
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/cc @hiroppy
Oh, I see. Need to add tests. |
94a6fa8
to
ac17350
Compare
@Loonride Still broken 😞 |
// the compilation needs to finish, as it will still be running | ||
// after the test is done if not finished, potentially impacting other tests | ||
compiler.hooks.done.tap('wdm-test', () => { | ||
done(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't reproduce the problem locally, but there was a problem with api.test.js
impacting getFilenameFromUrl.test.js
when it was being run directly after api.test.js
, happening on CI for webpack@next only.
The problem was that the very last test of api.test.js
was not waiting for compilation to finish, and somehow this was impacting the very first test of getFilenameFromUrl.test.js
by preventing the middleware's done hook from being called for this very first test.
I'm not sure why this was happening, but it could be something with webpack@next saving some global data about compiler hooks that is still there when the new webpack compilation starts. Also still not sure why I couldn't reproduce locally, I tried to make everything identical to the CI environment and installed webpack@next but tests still passed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very strange, if I comment this line, it is happens in CI, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@evilebottnawi Yes
Sorry if util tests are slightly repetitive to the If it's fine with everyone, I can add tests for more of the utils files - I will do this in a different PR |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All fine, we can merge it, many tests are always good
/cc @hiroppy
This PR contains a:
Motivation / Use-Case
The
getPaths
helper should be exported so that it can be used inwebpack-dev-server
: webpack/webpack-dev-server#2671Still need to add tests
Breaking Changes
None
Additional Info