It runs in test environment even when it should not.
ThiagoFacchini opened this issue · 1 comments
ThiagoFacchini commented
First of all I just wanted to say why-did-you-update is a must library on my projects.
Although I've been bumping into this annoying issue where they library is executing the checkings under test environment which is annoying.
So here's how I'm consuming the library:
`
/* istanbul ignore else */
console.log(process.env.NODE_ENV)
if (process.env.NODE_ENV === 'development') {
const { whyDidYouUpdate } = require('why-did-you-update')
// $FlowFixMe
whyDidYouUpdate(React)
}`
On the console I get 'test' but I'm still getting notified about avoidable re-rendering... I'm wondering if anyone else bumped into the same and how was it handled, or even if there's a way fix it...
Thanks in advance.