vow icon indicating copy to clipboard operation
vow copied to clipboard

Filter test files using "includes" instead of "equals"

Open MZanggl opened this issue 6 years ago • 3 comments

Proposed changes

Testing a single file currently requires you to specify the entire file name, including the file extension. E.g.

adonis test -f 'UserService.spec.js'

With this fix in place, simpy UserService or even User would be enough. This then nicely aligns with the way grep works

Types of changes

What types of changes does your code introduce?

Put an x in the boxes that apply

  • [ ] Bugfix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • [ x I have read the CONTRIBUTING doc
  • [x] Lint and unit tests pass locally with my changes
  • [x] I have added tests that prove my fix is effective or that my feature works.
  • [ ] I have added necessary documentation (if appropriate)

MZanggl avatar Dec 05 '19 13:12 MZanggl

Coverage Status

Coverage increased (+1.3%) to 82.422% when pulling d8ffabf57b1d9b6266513e5f3fa52b206d3e463a on MZanggl:feature/filter-files-contains into 4a461e2144c4ea8bf9b7a5477916cb81c029dc63 on adonisjs:develop.

coveralls avatar Dec 05 '19 13:12 coveralls

Hey @MZanggl!

Thanks for your contribution! Could you please add some tests that cover your change.

@thetutlage Do you believe we should consider this as breaking change?

RomainLanz avatar Dec 06 '19 20:12 RomainLanz

@RomainLanz I just added tests. I moved the filter part to the cli so now all the filtering is together in one place and became easy to test.

MZanggl avatar Dec 25 '19 12:12 MZanggl