Comments (5)
Could have a simple regex to just pull out the def
calls and just set the arity to 0 by default
const defRegex = /\n\s*def\s([a-z_\?]+)/
from vscode-elixir-test.
At the very least just pulling a template string out of the config or defaulting to the current one.. Just nice bc i usually include @moduledoc and even just one describe block saves a bit of time
from vscode-elixir-test.
@sitch sorry for the delayed answer. Sounds like a good thing to do. Can you open a PR for that?
from vscode-elixir-test.
I ended up writing more sophisticated test generators and templates dispatch based on folder structure / the presence of certain use macros which are likely coupled to some of my personal implementations, and would require some introspection with elixir
I could probably update the current template method fn and add the regex above to pull out the defs or default to some example text in the even there are no defs. Won't be able to get around to it for a little while though.
Moving forward though, probably the most user friendly is to add a template_dir
config option, which, if present and contains only one template it uses that, and if it contains more than one templates, then open an additional dialog option to select the template of your choice
from vscode-elixir-test.
I'm closing this one for now. If there's any interesting in opening a PR we can re-open it 😄
from vscode-elixir-test.
Related Issues (20)
- 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" HOT 1
- Elixir Test not available on VSCodium
- Save all before running?
- The command to watch the test at cursor just runs it once without a watch HOT 1
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.