quolpr / quicktest.nvim

Run your tests in split window or popup with live feedback
MIT License
66 stars 5 forks source link

[dart] adapter and example test for it #6

Closed skela closed 2 months ago

skela commented 2 months ago

Makes it so u can use quick test for dart/flutter tests.

It prob needs some configuration options to pass in which binary to use to run the tests, either dart, flutter or fwm flutter, but this is a good starting point.

Let me know if i need to change something.

quolpr commented 2 months ago

Hi! Thank you for the contribution. I will take a look soon. A bit busy at my work 🙂

quolpr commented 2 months ago

@skela thank you for all your work! But I found some issues, could you fix them?

  1. When I tried to run test from this line - it didn't work. Quicktest designed to locate the nearest test, even if it is not under cursor. Could you take https://github.com/sidlatau/neotest-dart/blob/main/lua/neotest-dart/init.lua#L47 and adopt it? You can use helper like it's done here https://github.com/quolpr/quicktest.nvim/blob/f030a503a77bbc738cf489858deaff889923e559/lua/quicktest/adapters/elixir/init.lua#L33 , should be easy! But let me know if it's hard to do or you stucked. Here what I see when I try to run test under cursor: image
  2. cwd detection logic used only for build_all_run_params, could you also add same logic to build_dir_run_params, build_file_run_params, build_line_run_params?
  3. Title is empty when I run all tests
  4. Could you improve title overall? Display that Running file: <path-to-file>:<line>, Running file:<>, Running dir: <>, Running all. Also, could you remove cwd from the path in title to make it short?
skela commented 2 months ago

Will fix asap, thx for taking a look ❤️

skela commented 2 months ago

@quolpr ok i think i sorted out the issues u had now. ive never been able to get neotest to work for my tests in dart, so i was a bit cautious going all in on that solution, but i went with the best of both worlds, hope you dont mind.

quolpr commented 2 months ago

@skela will review hope this week, busy right now. Thanks for contribution!

quolpr commented 2 months ago

@skela works great! Thanks for the contribution 👍