Skip to content
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

Support running tests for ClojureScript files #369

Open
heralden opened this issue Aug 27, 2019 · 3 comments
Open

Support running tests for ClojureScript files #369

heralden opened this issue Aug 27, 2019 · 3 comments

Comments

@heralden
Copy link

:RunTests runs the Clojure tests for the namespace when invoked from a .cljs file, and cpr only does a :Require.

Any chance of adding support for cljs.test? It seems it can be a bit tricky with s:capture_test_run as it uses many clojure.test functions that aren't present in cljs.test.

@tpope
Copy link
Owner

tpope commented Sep 1, 2019

I'm open to ideas.

@dhleong
Copy link
Contributor

dhleong commented Sep 8, 2019

It's probably still missing some cases, but I've been working with this for some time: https://github.com/dhleong/vim-hearth/blob/master/autoload/hearth/test/cljs.vim

@sheluchin
Copy link

As far as cpr goes, I think part of the problem is that vim-fireplace tries to call load-file on a resource path, but it expects an actual file path. So, while the src/test is on the classpath, using (load-file "foo/some-test.cljs") on src/test/foo/some-test.cljs will not work anyway - it needs to call (load-file "src/test/foo/some-test.cljs").

Also worth noting that shadow-cljs added support for relative paths fairly recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants