Comments (7)
I believe this only needs to be called once, not on every test run. Perhaps have a "setup-fn" that's specified in project.clj and called in leiningen.test-refresh/test-refresh
?
from test-refresh.
Interesting problem.
Allowing a generic setup-fn
would allow lein-test-refresh
users to do whatever they want (depending on implementationeither prior to every test run or just once before running any tests). That is an interesting approach as it would let people do whatever they want and I think would enable some neat things. If implemented for solving this problem it does put quite a burden on user of lein-test-refresh
. I think the function would need to be called in the com.jakemccrary.test-refresh/monitor-project
as that is when code is being evaluated within the context of the project.
Another approach would be to add a :refresh-dirs
option that is similar to the :watch-dirs
option. This feels a lot easier for users.
I won't be able to give a shot at either solution until sometime later this week. I'd most likely accept a PR for :refresh-dirs
immediately. I'd need to think about the setup-fn
idea a bit before getting that feature into the codebase.
from test-refresh.
Actually, was thinking about some weirdness I've been seeing in one of my own projects and wondering if its because of this problem. Going to build out the first option today.
from test-refresh.
Released 0.16.1-SNAPSHOT
with a :refresh-dirs
option. Check the sample.project.clj for what it looks like.
Sort of wondering if :watch-dirs and :refresh-dirs should be collapsed into a single option. I'm having a difficult time coming up with a scenario in which you would set one and not the other.
from test-refresh.
Thanks! From my initial testing, setting :refresh-dirs
with 0.16.1-SNAPSHOT
works for me!
I don't know enough about how Figwheel does its compilation, but I wonder if Figwheel could be convinced to place its compilation someplace other than where the final JavaScript output ends up. Of course that's an issue for a different project :)
Thanks again for your quick response!
from test-refresh.
Just released a non-snapshot release, 0.17.0
, with this feature.
from test-refresh.
Thanks!
from test-refresh.
Related Issues (20)
- Does not find data_readers.clj HOT 2
- run-once should exit with non-zero if there were test failures HOT 1
- Need to respect :source-paths and :test-paths from project.clj HOT 1
- Clearing screen before each test run HOT 3
- test-refresh fails to start when project.clj has managed dependencies HOT 3
- Specs are not reloaded when run through compojure-api HOT 2
- Readme: Add an example of how to integrate with ultra or eftest HOT 6
- Feature request: circleci.test support HOT 3
- Issue with test refresh and clojure 1.9 with spec HOT 1
- test-refresh loads configuration for dev profile while running after a repl is started HOT 3
- Tests are run multiple times on file change when using a docker volume on OSX HOT 1
- Launch nrepl server along with the test runner HOT 2
- Add a way to filter out test namespaces with regex HOT 6
- Allow using custom keyword instead of :test-refresh/focus HOT 2
- Running in Cursive REPL HOT 4
- ^:test-refresh/focus selector doesn't work in 0.24.0 HOT 2
- Problem with defonce and URLStreamHandlerFactory HOT 4
- Is it possible to place test files and source files under a single root directory? HOT 2
- `:quiet` flag is broken HOT 2
- `:quiet` flag is ignored under `deps/cli` HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from test-refresh.