-
Notifications
You must be signed in to change notification settings - Fork 215
Feature: Test running functionality #386
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
Comments
@Blond11516 sounds great. Please go on with the PRs |
I've moved this to the elixir-ls repository since I think it fits better here. I think this would be a great enhancement! And I definitely like that ElixirLS would be returning all the potentials locations that could be tested. Some thoughts:
@lukaszsamson/@msaraiva do you have any thoughts on the ElixirSense/finding all the tests for a given file? |
I'd avoid executing client code in ls process
Maybe full metadata is not necessary and we could do a simple test extraction similarly to what DocumentSymbolsProvider does. |
I've seen it done (see the Java Test Runner as an example) but you do lose access to the terminal and you have to come up with some other way of displaying test results. So if we wanted to do it, it would require quite a bit more work. |
It would be great If we could support running a single test with debugger also. IIRC there were some feature requests for that. |
I've been looking into this for the past few days and the only way I've found to do this is to manually add checks for the libraries we'd like to support. I've been playing around with Elixir Sense's expand_full function to see if there's something common to all test macros that we could use, but I couldn't get it to expand
Yeah that was on my todo list too. From what I've seen from other extensions this should be fairly easy to do once the test running functionality is done. I've also been looking for a more robust way to identify runnable tests. By directly playing with ElixirSense's parser and metadata I can fairly easily check whether a module imports I've opened a draft PR so you can see where I'm at right now: #389 |
Thanks a lot @axelson and @lukaszsamson for your help on this. This felt a little big and scary at first but your feedback helped me a ton along the way! I'm really motivated to improve on this, so you can expect to hear from me again in the future ;) |
Congrats on getting in! We're glad to have a contribution from you and we look forward to more in the future! 🎉 |
Hi! I'm not sure if this issue should be opened here or on the elixir-ls repository. Please let me know if this is not the right place and I'll gladly move it.
I've recently been playing around with adding test running functionality to the extension. My first step is to have the extension provide code lenses to automatically run tests on click (like Jest Runner does).
I've got a simple POC which works on the following levels:
Before going any further with this I wanted to check for interest for such a feature and gather comments on a good implementation.
The text was updated successfully, but these errors were encountered: