Giter Site home page Giter Site logo

Comments (5)

sitch avatar sitch commented on August 10, 2024

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.

sitch avatar sitch commented on August 10, 2024

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.

samuelpordeus avatar samuelpordeus commented on August 10, 2024

@sitch sorry for the delayed answer. Sounds like a good thing to do. Can you open a PR for that?

from vscode-elixir-test.

sitch avatar sitch commented on August 10, 2024

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.

samuelpordeus avatar samuelpordeus commented on August 10, 2024

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)

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.