mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
tidy tests
This commit is contained in:
@@ -15,24 +15,24 @@ const ruleTester = new RuleTester();
|
||||
|
||||
ruleTester.run('no-production-logging', rule, {
|
||||
valid: [
|
||||
/* wrapped calls */
|
||||
{
|
||||
code: 'if (__DEV__) {warningWithoutStack(test)}',
|
||||
code: 'if (__DEV__) { warningWithoutStack(test) }',
|
||||
},
|
||||
{
|
||||
code: 'if (__DEV__) {warning(test)}',
|
||||
code: 'if (__DEV__) { warning(test) }',
|
||||
},
|
||||
/* calls wrapped on an outer bound */
|
||||
{
|
||||
code: 'if (__DEV__) { if (potato) { while (true) { warning(test) }}}',
|
||||
},
|
||||
/* don't do anything to arbitrary fn's or invariants */
|
||||
{
|
||||
code: 'normalFunctionCall(test)',
|
||||
},
|
||||
{
|
||||
code: 'invariant(test)',
|
||||
},
|
||||
{
|
||||
code: 'if (__DEV__) {normalFunctionCall(test)}',
|
||||
},
|
||||
],
|
||||
invalid: [
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user