You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into this while working on a different fix which extended the compilation time. I will make a PR with the fix for this test. I think this is the only test where this mistake is made, but I'm not 100% sure.
The text was updated successfully, but these errors were encountered:
knagaitsev
changed the title
Routes Test relies on compilation to finish
Routes Test relies on compilation to finish, but doesn't wait for it
Mar 23, 2019
Code
The request made to /webpack-dev-server by Routes.test.js relies on the webpack compilation to complete: https://github.com/webpack/webpack-dev-server/blob/master/test/Routes.test.js#L58
Expected Behavior
Compilation should finish before the test starts. As stated here: #847 the server callback can be called before compilation is done.
Actual Behavior
If the compilation takes a long time, this test fails, since it does not wait for compilation to finish before testing.
For Bugs; How can we reproduce the behavior?
Bring the test here: https://github.com/webpack/webpack-dev-server/blob/master/test/Routes.test.js#L58 to the top, and the test will probably run before compilation is done. The only reason it has been succeeding is because there are many tests before it, and compilation has time to finish.
Additional
I ran into this while working on a different fix which extended the compilation time. I will make a PR with the fix for this test. I think this is the only test where this mistake is made, but I'm not 100% sure.
The text was updated successfully, but these errors were encountered: