avajs / ava

Node.js test runner that lets you develop with confidence 🚀
MIT License
20.72k stars 1.41k forks source link

Watch mode filter by filename and by test name #1530

Open unional opened 7 years ago

unional commented 7 years ago

Issuehunt badges

ava@0.22

borrow the idea from jest:

Watch Usage
 › Press p to filter by a filename regex pattern.
 › Press t to filter by a test name regex pattern.
 › Press q to quit watch mode.
 › Press Enter to trigger a test run.

These two features are very valuable. They allow me to focus on a subset of tests when I am working on a specific part of the system.

There is a $80.00 open bounty on this issue. Add more on Issuehunt.

novemberborn commented 6 years ago

Sure.

Does Enter rerun all tests, like r does with AVA? That's quite neat actually.

unional commented 6 years ago

Enter reruns the filtered list of tests. They use a to rerun all tests.

novemberborn commented 6 years ago

Enter reruns the filtered list of tests. They use a to rerun all tests.

Sounds like we should borrow that too 😉

IssueHuntBot commented 5 years ago

@issuehunt has funded $80.00 to this issue.


radasam commented 2 years ago

Hi, Is this still worth working on?

I've noticed there is already an option to pass patterns to the watcher but this is using wildcards, do we want to use this instead of regex?

novemberborn commented 2 years ago

@radasam it'd be neat, yea! The key change over our current watch mode is being able to take inputs, be it filtering the files or the tests. Whether that has to take the form of Jest' implementation from five years ago, or their current implementation, I do not know. For example a "type some characters and we'll show you a subset of the files / tests that match somehow and then you can run those" could be quite interesting.

radasam commented 2 years ago

Ok sounds good, I've managed to get something working for filtering by filename, I'm just working on filtering for test names

ologbonowiwi commented 4 months ago

Is this something that would still be valuable to have?

Do we had any progress or advancements on other stuff that could potentially help implementing this?

novemberborn commented 3 months ago

Is this something that would still be valuable to have?

I think so.

Do we had any progress or advancements on other stuff that could potentially help implementing this?

The watch implementation was modernized last year, that may make things easier.