-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Don't fail if sources are included #52
Comments
The issue can be fixed by switching to absolute path for the |
This commit adds a manual test case that simulates accidently including source files into the `files` and `preprocessor` section of the karma configuration file. Related to #52
This commit handles unintentional source includes by hijacking the browserify exposeAll=true option. This ensures all files get exported through the generated bundle. Individual files are then properly recognized by test stubs AND via direct (in-bundle) lookup. Unfortunately this breaks external requires, e.g. `browserify.external('foobar')`. Oooops! Failing test case attached. Related to #52
Using relative path + |
Recent @bendrucker Good you fixed our example for now. We should re-install the commit once this issue is resolved. Having these "special" setups in the examples repository (including a big warning note) is the only way we can verify newer versions of browserify do not break things (including custom-made special setups). |
Given the constant shifting in browserify's internals we should have the normal unit tests and then smoke test suites (versus leaving stuff in example). |
Good call. I will create an extended smoke test version of the example project somewhere in the test directory. |
Well, this issue is a blocker for me. It can easily make your test-suite fail, if you include helpers or mock date with your tests:
With our current behavior, if |
Stuff is fixed on the 52-fix branch. @bendrucker Could you have a look at it? I'd love to release this as version 2.0.0 as it appears to me as if this is the most stable karma-browserify since karma-bro 0.6.x. 😃 |
Looks great. One question: Are you sure that |
Just a precaution in case of changing browserify internals ;-) |
I think it's unlikely to be meaningful to have a minor memory leak there so it's okay to change |
@nikku Hi, this problem still exist in [email protected], but it's ok for 1.0.1. |
Hmm, we have got some integration tests that report it is fixed. Could you open another issue with hints on your test setup and ways to reproduce the behavior you are experiencing? |
@nikku To reproduce this is very simple. I just use @estekhin repo: https://github.com/estekhin/sandbox-karma-browserify and change
Then you can use two versions to reproduce it. PS: I use win7 with node v0.10.25. |
Works for me in either configuration. |
Had the same issue. After some digging around the cause seems to be in the browserify version (7.0.3), forced it to work with 8.0.3 and it seems to work properly now. Don't know what the exact reason could be. |
If sources are included in the
files
/preprocessors
section in akarma.conf.js
karma fails to start withThis looks like a regression (was supposed to work in
karma-bro <= 0.10
.See #51 and #50.
The text was updated successfully, but these errors were encountered: