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

give users a way to squelch individual warnings #90

Closed
searls opened this issue Mar 30, 2016 · 5 comments
Closed

give users a way to squelch individual warnings #90

searls opened this issue Mar 30, 2016 · 5 comments

Comments

@searls
Copy link
Member

searls commented Mar 30, 2016

Give users a local way to squelch warnings generated by the library. Ideally this should be local to either each rule or to each violation, to discourage users from globally disabling all warnings.

Hey @jasonkarns & @davemo any opinions on this?

One idea:

td.ignoreWarnings('optional excuse here', function(){
  td.when(somethingThatWouldTriggerAWarning()).thenReturn()
  //…
})
@searls searls added this to the console.warn heuristics milestone Mar 30, 2016
@davemo
Copy link
Contributor

davemo commented Mar 30, 2016

What about just an internal configuration flag that's less granular than scoping to a particular block?

Maybe expose it through something like td.config({ignoreWarnings: false}) where config contains {ignoreWarnings: false} as a default?

@davemo
Copy link
Contributor

davemo commented Mar 30, 2016

Then you could just put the td.config in your test_helper file once and be done with it.

@searls
Copy link
Member Author

searls commented Mar 31, 2016

I'd prefer not to give people only a global option for disabling all warnings when what's most likely is they have one or two they have good reason for generating

On Mar 30, 2016, at 16:39, David Mosher notifications@github.com wrote:

What about just an internal configuration flag that's less granular than scoping to a particular block?

Maybe expose it through something like td.config({ignoreWarnings: false}) where options contains {ignoreWarnings: false} as a default?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@searls
Copy link
Member Author

searls commented Apr 3, 2016

@davemo wins this one:

td.config({
  ignoreWarnings: true
})

Just landed in 1.3.0

@searls searls closed this as completed Apr 3, 2016
@davemo
Copy link
Contributor

davemo commented Apr 3, 2016

🤘

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

No branches or pull requests

2 participants