Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dart] adapter and example test for it #6

Merged
merged 6 commits into from
Jul 7, 2024
Merged

Conversation

skela
Copy link
Contributor

@skela skela commented Jun 29, 2024

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
Copy link
Owner

quolpr commented Jun 30, 2024

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

@quolpr
Copy link
Owner

quolpr commented Jul 2, 2024

@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
    local test_pos = ts.get_current_test_range(query, bufnr, cursor_pos, "test")
    , 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
Copy link
Contributor Author

skela commented Jul 2, 2024

Will fix asap, thx for taking a look ❤️

skela added 4 commits July 3, 2024 18:01
…th single quotes as opposed to quotes. also made sure it still works if test names have variable subs (dollar sign) formatters in em.
… that are marked as test (in particular, run All, and run previous relies on this allowing it)
@skela
Copy link
Contributor Author

skela commented Jul 3, 2024

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

@skela skela changed the title dart adapter and example test for it [dart] adapter and example test for it Jul 3, 2024
@quolpr
Copy link
Owner

quolpr commented Jul 5, 2024

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

@quolpr
Copy link
Owner

quolpr commented Jul 7, 2024

@skela works great! Thanks for the contribution 👍

@quolpr quolpr merged commit d16d50d into quolpr:main Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants