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
Tests aren't rebuilt upon code changes #140
Comments
I agree with you in spirit. Unfortunately, right now the plugin doesn't have any way to know which of the For small projects, with one build and one test target, this would work perfectly. However, for bigger projects, with several builds , this could often result in a large amount of code being needlessly compiled before the tests are run. For instance, my current pet project has two builds, one which takes about 1 second to compile, and another that takes about 20 seconds to compile. If I want to run tests just for the 1 second build, it would be painful to wait while the 20 second build compiled for no reason. I'm not really sure what the best solution to this is. The first thing that comes to mind would be to explicitly list which In the meantime, I recommend running |
I am noticing I also have to clean, to get my "production" code included into the test js file. In other words, if I don't clean and Does this sound right? If not, I can try and produce a simplified repro. |
How about an explicit :deps to register other build ids, or :source-paths to explicitly register that "test" depends on main code as well as test code. This is a major pain at present, as it makes 'cljsbuild auto' unusable for TDD. |
+1 |
Hacky solution for that is putting path to the js deployed by "production" into :libs vector in :compiler map of test profile. Not ideal, but does the job. |
Issue #173 (which will go out in the 0.3.0 release) added support for |
Looks good to me. At last, no dodgy hacks needed :) |
Is this still a problem? Trying to assess / triage potentially stale issues here… |
It can be closed in my opinion. |
Yeah, I think this can be closed too. That pull request would just make things a little more clear for beginners. |
I've noticed that running lein cljsbuild test doens't recompile the test file after a change in the main code, so the tests still pass even if I introduce a bug.
Example:
I would expect that test to fail.
The text was updated successfully, but these errors were encountered: