tidy tests

This commit is contained in:
Laura González
2019-12-05 16:25:42 +00:00
parent 46e17a9700
commit 38f5068684
@@ -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: [
{