tape-testing / tape

tap-producing test harness for node and browsers
MIT License
5.77k stars 307 forks source link

Suggestion: Ignore pattern directly instead of pointing to a file? #586

Closed ppati000 closed 1 year ago

ppati000 commented 1 year ago

The --ignore flag does not take a glob pattern, but a path to a file that contains the ignored patterns. This level of indirection is not always needed. For example, I'd love to have a simple command that runs all *.test.ts files except for files in a specific directory (e.g., a directory that contains end-to-end tests).

@ljharb what do you think about adding an --ignorePattern or similar option that takes a glob pattern? Would be willing to raise a PR :)

ljharb commented 1 year ago

That does seem reasonable - basically, shorthand for a one-line ignore file.

ljharb commented 1 year ago

Note, that we'd have to be very very explicit about how --ignore and --ignorePattern worked together - either they're mutually exclusive, or ignorePattern is concatenated to --ignore's contents, or the reverse.

ppati000 commented 1 year ago

@ljharb awesome, just opened https://github.com/ljharb/tape/pull/587. See the description there! :)