Skip to content
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

Adds a console config object to ignore methods #38

Merged
merged 2 commits into from
Mar 6, 2019

Conversation

mackenco
Copy link

@mackenco mackenco commented Mar 6, 2019

This fixes #35 (and to a lesser extent #36 - not exactly, but enough that I can keep working).

Supports passing of a console object to the cft API. console object takes a list of key/values where the key is a console function and the value is a boolean to error on that function or not. Example:

require("console-fail-test").cft({
    console: {
        warn: false, // won't error on any instance of console.warn
    },
});

@JoshuaKGoldberg JoshuaKGoldberg self-requested a review March 6, 2019 22:00
src/cft.ts Outdated Show resolved Hide resolved
Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg left a comment

Choose a reason for hiding this comment

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

Mostly nits, sorry... great addition! Really excited to have you contribute!! 🚀

src/types.ts Outdated Show resolved Hide resolved
src/cft.ts Outdated Show resolved Hide resolved
src/cft.ts Outdated Show resolved Hide resolved
@JoshuaKGoldberg JoshuaKGoldberg merged commit efe39e5 into JoshuaKGoldberg:master Mar 6, 2019
@JoshuaKGoldberg
Copy link
Owner

Thanks so much @mackenco! I'll cut a release now.

@mackenco mackenco deleted the ignore-warnings branch March 6, 2019 23:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow banning only some methods on console
2 participants