Skip to content

chore(testing): Add options object to be able to pass in other glob options #264

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

Merged
merged 1 commit into from
Feb 1, 2019

Conversation

ryanseddon
Copy link
Contributor

Description

Glob has a few other options that would be useful to access through this helper method.

Detail

I wanted to ignore a directory, rather than add just ignore as another parameter I've added the options parameter so you can pass through any glob option.

I've also made this a non-breaking change by keeping cwd around.

Both of these are valid uses of getExports.

getExports({ cwd: __dirname, options: { ignore: 'a/**' } });
getExports({ options: { ignore: 'a/**', cwd: __dirname } });

If you specify the cwd option that will override a cwd property in the options parameter.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 93.827% when pulling 1a678d2 on ryan/add_options_getExports into 8934a2c on master.

Copy link
Contributor

@austingreendev austingreendev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@ryanseddon ryanseddon merged commit b8e8a4c into master Feb 1, 2019
@ryanseddon ryanseddon deleted the ryan/add_options_getExports branch February 1, 2019 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants