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

Warnings log even though warn is set to false #43

Open
arasmussen opened this issue Aug 27, 2017 · 3 comments
Open

Warnings log even though warn is set to false #43

arasmussen opened this issue Aug 27, 2017 · 3 comments

Comments

@arasmussen
Copy link

arasmussen commented Aug 27, 2017

Here's my configuration:

import ReactHTMLEmail from 'react-html-email';

ReactHTMLEmail.injectReactEmailAttributes();
ReactHTMLEmail.configStyleValidator({
  strict: true,
  warn: false,
  platforms: [
    'gmail',
    'gmail-android',
    'apple-mail',
    'apple-ios',
  ],
});

Then here's the warning I get even though warn is set to false:

Warning: Failed prop type: Style property `border-radius` supplied to `A` unsupported in: gmail-android.
    in A (created by CTA)
    in CTA
    in tbody (created by Box)
    in table (created by Box)
    in Box (created by Email)
    in td (created by Item)
    in tr (created by Item)
    in Item (created by Email)
    in tbody (created by Box)
    in table (created by Box)
    in Box (created by Email)
    in body (created by Email)
    in html (created by Email)
    in Email

Am I doing something wrong?

@arasmussen arasmussen changed the title Warnings log even though warn is set to true. Warnings log even though warn is set to false Aug 27, 2017
@rohan-deshpande
Copy link

Did you get anywhere with this? I haven't been able to solve it either, it's annoying for tests, stubbing console.warn doesn't seem to help either somehow

@arasmussen
Copy link
Author

Nope 😕

@rohan-deshpande
Copy link

Hmm, weird. Well I was wrong about the tests, they are using console.warn and console.error but the "error" messages have Warning: in them so I assumed they were warns. After stubbing both methods stuff doesn't get printed to the terminal anymore during tests.

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