hulu / roca

A command-line tool for running brightscript tests
Apache License 2.0
25 stars 19 forks source link

feat(cli): support testing specific files #91

Closed lkipke closed 3 years ago

lkipke commented 3 years ago

Change summary

This adds support for running specific test files from the command line. Similar to jest (see docs) it allows the user to specify any strings that appear in the file path, and we'll find files that match or partially match those strings.

Maybe this handles #32? At least, it partially does -- it doesn't filter by suite or test names, but rather by file names.

For example, consider this file structure:

root/
  |__ foo/
          |__ bar.test.brs
          |__ baz.test.brs
  |__ fly-you-fools.test.brs

With the command: roca foo, we'd end up testing:

root/foo/bar.test.brs
root/foo/baz.test.brs
root/fly-you-fools.test.brs

With the command roca bar or roca bar.test.brs we'd end up testing:

root/foo/bar.test.brs

For more examples, check the test cases I added!