No change to logic. This swaps out Array.prototype.indexOf in favor for
Array.prototype.includes() to simplify logic. This does the same for the
equivalent String.prototype functions.
Test: npm test
On Unix, this only matches files with the exec bit set. On Windows, this only
matches files which are readable (since Windows has different rules for
execution).
Fixes#657.
This adds `skipOnWin` and `skipOnUnix` to help us manage our platform-dependent
tests. These methods give a nice warning message when we skip tests. We may also
consider adding warnings when running platform-dependent tests.
Part of the motivation for this is if we ever update to AVA v0.19. This version
requires at least one assertion per test case. While this could be disabled with
an AVA setting, we instead benefit from warnings for any case when we
unintentionally skip assertions.
This adds chalk as a dev dependency to enable colored messages.
* feature: add -a option for which command
* chore(test): test which -a with unexisting name
* chore(test): check which -a has same result as regular one
* chord(test): fix errors mentioned by eslint
Redo of #134
`which` now searches through PATHEXT on Windows, and it also now does a
case-insensitive comparison. This better fits the Windows environment, where
the OS usually ignores case.