babelify icon indicating copy to clipboard operation
babelify copied to clipboard

fix docs and add test: `ignore` and `only` take arrays as arguments

Open agilgur5 opened this issue 6 years ago • 2 comments

  • just passing a single regex causes errors:
    • Error: .ignore must be an array, or undefined
    • Error: .only must be an array, or undefined

agilgur5 avatar Nov 27 '19 07:11 agilgur5

Added ignore and only to the options test to ensure the docs I fixed have a passing test somewhere. Putting a single regex in (not array) causes it to error out.

It might be good to actually test the ignore option (right now the test confirms that nothing changes when it ignores a fake regex), but didn't want to change up the tests too much. The only option will cause errors if we remove some of the required files.

agilgur5 avatar Nov 27 '19 07:11 agilgur5

The CI failure is unrelated to this code, test/options.js passes.

The test error seen in CI I was getting locally from a fresh clone too, so it predates this PR. The docs commit (which changes no actual code) also got this error in CI.

agilgur5 avatar Nov 27 '19 07:11 agilgur5