From f964be5f8ab67cb68706ab667adbab98cc7cad79 Mon Sep 17 00:00:00 2001 From: Lucas Duailibe Date: Thu, 7 Sep 2017 23:47:13 -0300 Subject: [PATCH] Remove unnecessary tests --- tests/jsx/__snapshots__/jsfmt.spec.js.snap | 122 --------------------- tests/jsx/conditional-expression.js | 62 ----------- 2 files changed, 184 deletions(-) diff --git a/tests/jsx/__snapshots__/jsfmt.spec.js.snap b/tests/jsx/__snapshots__/jsfmt.spec.js.snap index 076b2cfc..f3113b4b 100644 --- a/tests/jsx/__snapshots__/jsfmt.spec.js.snap +++ b/tests/jsx/__snapshots__/jsfmt.spec.js.snap @@ -34,58 +34,6 @@ normalModeBreaking ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa : "c"; -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. The line does not break, so it does not contain -// parens. -
- {a ? "b" : "c"} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the consequent is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : "c"} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the consequent is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : null} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the alternate is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? "b" - : johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the alternate is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? null - : johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the test is very long, they are broken in -// multiple lines but no parens are added. -
- {johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - ? "b" - : "c"} -
; - // This ConditionalExpression prints in JSX mode because its test is a // JSXElement. It is non-breaking. // Note: I have never, ever seen someone use a JSXElement as the test in a @@ -139,16 +87,6 @@ jsxModeFromElementBreaking ? ( {a ? "a" : b ? "b" : "c"} ; -// This chain of ConditionalExpressions prints in normal mode even though its parent is a -// JSXExpressionContainer. It is breaking. -
- {a - ? "a" - : b - ? "b" - : thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo} -
; - // This chain of ConditionalExpressions prints in JSX mode because there is a // JSX element somewhere in the chain. It is non-breaking. cable ? "satellite" : public ? "affairs" : network ? : "dunno"; @@ -228,56 +166,6 @@ normalModeBreaking ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa : "c"; -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. The line does not break, so it does not contain -// parens. -
{a ? "b" : "c"}
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the consequent is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : "c"} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the consequent is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : null} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the alternate is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? "b" - : johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the alternate is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? null - : johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the test is very long, they are broken in -// multiple lines but no parens are added. -
- {johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - ? "b" - : "c"} -
; - // This ConditionalExpression prints in JSX mode because its test is a // JSXElement. It is non-breaking. // Note: I have never, ever seen someone use a JSXElement as the test in a @@ -335,16 +223,6 @@ jsxModeFromElementBreaking ? ( // non-breaking.
{a ? "a" : b ? "b" : "c"}
; -// This chain of ConditionalExpressions prints in normal mode even though its parent is a -// JSXExpressionContainer. It is breaking. -
- {a - ? "a" - : b - ? "b" - : thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo} -
; - // This chain of ConditionalExpressions prints in JSX mode because there is a // JSX element somewhere in the chain. It is non-breaking. cable ? "satellite" : public ? "affairs" : network ? : "dunno"; diff --git a/tests/jsx/conditional-expression.js b/tests/jsx/conditional-expression.js index 4ba59739..5266662a 100644 --- a/tests/jsx/conditional-expression.js +++ b/tests/jsx/conditional-expression.js @@ -31,58 +31,6 @@ normalModeBreaking ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa : "c"; -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. The line does not break, so it does not contain -// parens. -
- {a ? "b" : "c"} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the consequent is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : "c"} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the consequent is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - : null} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the alternate is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? "b" - : johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the alternate is very long, they are broken in -// multiple lines but no parens are added. -
- {a - ? null - : johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa} -
; - -// This ConditionalExpression prints in normal mode even though its parent is a -// JSXExpressionContainer. Because the test is very long, they are broken in -// multiple lines but no parens are added. -
- {johnJacobJingleHeimerSchmidtHisNameIsMyNameTooWheneverWeGoOutThePeopleAlwaysShoutThereGoesJohnJacobJingleHeimerSchmidtYaDaDaDaDaDaDa - ? "b" - : "c"} -
; - // This ConditionalExpression prints in JSX mode because its test is a // JSXElement. It is non-breaking. // Note: I have never, ever seen someone use a JSXElement as the test in a @@ -136,16 +84,6 @@ jsxModeFromElementBreaking ? ( {a ? "a" : b ? "b" : "c"} ; -// This chain of ConditionalExpressions prints in normal mode even though its parent is a -// JSXExpressionContainer. It is breaking. -
- {a - ? "a" - : b - ? "b" - : thisIsASongAboutYourPoorSickPenguinHeHasAFeverAndHisToesAreBlueButIfISingToYourPoorSickPenguinHeWillFeelBetterInADayOrTwo} -
; - // This chain of ConditionalExpressions prints in JSX mode because there is a // JSX element somewhere in the chain. It is non-breaking. cable ? "satellite" : public ? "affairs" : network ? : "dunno";