-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
"karma run" re-runs preprocessors for unmodified files #2829
"karma run" re-runs preprocessors for unmodified files #2829
Comments
This issue is relevant for WebStorm users, since it uses "karma run" for each test run. Related WebStorm issue: https://youtrack.jetbrains.com/issue/WEB-28736. |
2 Months later. It would be nice if this could be worked on (or around ;-) ). Either here or for JetBrains karma integration. |
I wonder why you think unmodified files should not be preprocessed? In any case, the preprocessor plugin, not karma-runner, is responsible for preprocessing. Please ask about it on karma-babel-preprocessor. |
@johnjbarton Correct, karma-babel-preprocessor is responsible for processing. However, I'm not sure it should be responsible for caching its response, e.g. checking file's last modified date. Or should it be? |
@johnjbarton could you explain why Thanks |
karma does not know anything about what the preprocessor does. How can it know whether a file needs to be preprocessed when another file is changed? |
@johnjbarton Right, it's probably relevant for karma watcher as well, not only "karma run" command. Because |
It improves performance of "karma run" command which refreshes fileList. Closes #2829
Expected behaviour
Running tests via "karma run" should not run preprocessors for unmodified files.
Actual behaviour
Running tests via "karma run" always runs preprocessors for all files (including unmodified ones).
Environment Details
karma --version
): 1.7.1karma.config.js
file: see steps to reproduceSteps to reproduce the behaviour
./node_modules/karma/bin/karma start
./node_modules/karma/bin/karma run
Output:
Expected behaviour: unmodified files are not processed
The text was updated successfully, but these errors were encountered: