Giter Site home page Giter Site logo

Comments (11)

mracos avatar mracos commented on August 10, 2024 1

Maybe this could be solved if we always use fullPaths for the files

from vscode-elixir-test.

msramos avatar msramos commented on August 10, 2024 1

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.

GustavoSantosFe avatar GustavoSantosFe commented on August 10, 2024 1

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.

samuelpordeus avatar samuelpordeus commented on August 10, 2024 1

Ok, just to move forward with this issue: we are going with option 3. PRs are welcome πŸ˜…

from vscode-elixir-test.

samuelpordeus avatar samuelpordeus commented on August 10, 2024

let's go with that solution ☝️

from vscode-elixir-test.

mracos avatar mracos commented on August 10, 2024

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.exsand 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.

msramos avatar msramos commented on August 10, 2024

Why no just cd the root folder?

from vscode-elixir-test.

mracos avatar mracos commented on August 10, 2024

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.

samuelpordeus avatar samuelpordeus commented on August 10, 2024

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:

  1. Warn him that he is not on the root
  2. Create a new terminal on the root and run mix test
  3. cd to the root and run mix test

WDYT about these approaches? That could even be configurable πŸ€”

from vscode-elixir-test.

GustavoSantosFe avatar GustavoSantosFe commented on August 10, 2024

I like options 2 and 3
3 is easier but 2 is less likely to cause problems to the user

from vscode-elixir-test.

msramos avatar msramos commented on August 10, 2024

This is going to be included in the next release!

from vscode-elixir-test.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.