-
Notifications
You must be signed in to change notification settings - Fork 14
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
Glob expansion in shell prevents running all intended tests #31
Comments
More throwing this here to keep track of it; it looks like more of a fix than I have time for this morning. |
Yes! (I believe the same is true for double-quoting in, at least, bash) Is there an action to be taken in this issue? |
In general, IME, there's not much a CLI can do if the shell has expanded the arg before the receiving program runs and is provided ARGV, so I think this ticket is probably a no-op aside from scanning documentation? |
Do we expect teenytest to take other kinds of positional arguments, or could we accept any number of files or patterns from argv? If we do that, it doesn't matter where expansion happens. |
Can you give an example of what ARGV looks like after your shell has expanded it? My understanding is it'll often just be the first match, as opposed to something like an array of lots of items. To answer your question more directly: teenytest currently only supports a single pattern of test files. I'd love if it accepted multiple globs (and exclude patterns), though! |
Instead of |
Cool, in that case "supporting multiple globs" should fix this on its own one would think |
Let's track this in #32 |
If you run
teenytest test/**/*.js
in a terminal, the shell will expand that glob automatically, and theargvOptions
function will pull the first from that list to run. This is surprising, though there's a workaround: prevent shell expansion with single quotes:teenytest 'test/**/*.js'
. This allows theprepare
function to expand the glob as intended.The text was updated successfully, but these errors were encountered: