Comments (11)
Maybe this could be solved if we always use fullPaths
for the files
from vscode-elixir-test.
We can use this approach for individual files (runTestFile
and runTestAtCursor
), but the runTestSuite
command must run from project's root.
from vscode-elixir-test.
Maybe this could be solved if we always use
fullPaths
for the files
mix test
doesn't like it when you use the full path, I tried it π’
from vscode-elixir-test.
Ok, just to move forward with this issue: we are going with option 3. PRs are welcome π
from vscode-elixir-test.
let's go with that solution βοΈ
from vscode-elixir-test.
So it's πto using full paths then, since they do not work. π
Because of that, I thought of some approaches to find out the app root folder:
- Going up recursively relative from the current test file until we find a
mix.exs
and then assume it is the project root. - Get the "opened" folder in vscode and assume it is the project root (maybe it would not work with umbrella apps?)
- Going up recursively until we find a
.git
directory and assume it is the project root (maybe it does not work with git submodules?)
I rather like the first option, it seems to be the best one for me but maybe you folks have any other ideas? I'm all ears. π
from vscode-elixir-test.
Why no just cd
the root folder?
from vscode-elixir-test.
But how do we know which one is the root folder?
That's what the options above are, maybe I should have been more explicit π
from vscode-elixir-test.
I think that a good approach is to assume that the root folder of the Elixir App is the root folder of the vs-code workspace.
With that in mind, we have three options when the user tries to run the test suite outside root:
- Warn him that he is not on the root
- Create a new terminal on the root and run
mix test
cd
to the root and runmix test
WDYT about these approaches? That could even be configurable π€
from vscode-elixir-test.
I like options 2 and 3
3 is easier but 2 is less likely to cause problems to the user
from vscode-elixir-test.
This is going to be included in the next release!
from vscode-elixir-test.
Related Issues (20)
- Default keybinding to run tests conflicts with built-in shortcut HOT 7
- How to run last test? HOT 3
- Would be convenient to manage the create test template via config HOT 5
- Connect to vscode-test-explorer HOT 5
- Create either `module_test.exs` or `module.ex` conditionally based on the caller file HOT 5
- [Suggestion] Use watcher for tests HOT 2
- Add to Open VSX Registry HOT 3
- Consider more "jumps"? Maybe in a new extension? HOT 1
- Open VSX Listing: Signing the Publisher Agreement
- Handle terminal already running command / multiple terminals HOT 2
- Support multiple projects HOT 2
- Jump falsely shows pop-up "create test" in workspace HOT 1
- This extension hates the name "testing"
- Prefix MIX_ENV variable for mix test command HOT 3
- Wrong path separator when running through WSL HOT 1
- Optionally use a preferred terminal
- TypeError: Cannot read properties of undefined (reading 'length') HOT 2
- Terminal does not open when running a test
- Tests do not run - TypeError: Cannot read properties of undefined (reading 'replace') HOT 2
- Jump between test file and actual file not working im module name also contains "Test"
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 vscode-elixir-test.