prettier/tests/ternaries/__snapshots__/jsfmt.spec.js.snap

160 lines
4.9 KiB
Plaintext

// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`parenthesis.js 1`] = `
debug ? this.state.isVisible ? "partially visible" : "hidden" : null;
debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null;
a => a ? () => {a} : () => {a}
a => a ? a : a
a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
debug ? (this.state.isVisible ? "partially visible" : "hidden") : null;
debug
? this.state.isVisible && somethingComplex ? "partially visible" : "hidden"
: null;
a =>
a
? () => {
a;
}
: () => {
a;
};
a => (a ? a : a);
a =>
a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a;
`;
exports[`parenthesis.js 2`] = `
debug ? this.state.isVisible ? "partially visible" : "hidden" : null;
debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null;
a => a ? () => {a} : () => {a}
a => a ? a : a
a => a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
debug ? (this.state.isVisible ? "partially visible" : "hidden") : null;
debug
? this.state.isVisible && somethingComplex ? "partially visible" : "hidden"
: null;
a =>
a
? () => {
a;
}
: () => {
a;
};
a => (a ? a : a);
a =>
a ? aasdasdasdasdasdasdaaasdasdasdasdasdasdasdasdasdasdasdasdasdaaaaaa : a;
`;
exports[`test.js 1`] = `
const obj0 = conditionIsTruthy ? shortThing : otherShortThing
const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing
const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff }
const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing
const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff }
const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const obj0 = conditionIsTruthy ? shortThing : otherShortThing;
const obj1 = conditionIsTruthy
? { some: "long", object: "with", lots: "of", stuff }
: shortThing;
const obj2 = conditionIsTruthy
? shortThing
: { some: "long", object: "with", lots: "of", stuff };
const obj3 = conditionIsTruthy
? {
some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger",
object: "with",
lots: "of",
stuff
}
: shortThing;
const obj4 = conditionIsTruthy
? shortThing
: {
some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger",
object: "with",
lots: "of",
stuff
};
const obj5 = conditionIsTruthy
? { some: "long", object: "with", lots: "of", stuff }
: {
some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger",
object: "with",
lots: "of",
stuff
};
`;
exports[`test.js 2`] = `
const obj0 = conditionIsTruthy ? shortThing : otherShortThing
const obj1 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : shortThing
const obj2 = conditionIsTruthy ? shortThing : { some: 'long', object: 'with', lots: 'of', stuff }
const obj3 = conditionIsTruthy ? { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff } : shortThing
const obj4 = conditionIsTruthy ? shortThing : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff }
const obj5 = conditionIsTruthy ? { some: 'long', object: 'with', lots: 'of', stuff } : { some: 'eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger', object: 'with', lots: 'of', stuff }
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
const obj0 = conditionIsTruthy ? shortThing : otherShortThing;
const obj1 = conditionIsTruthy
? { some: "long", object: "with", lots: "of", stuff }
: shortThing;
const obj2 = conditionIsTruthy
? shortThing
: { some: "long", object: "with", lots: "of", stuff };
const obj3 = conditionIsTruthy
? {
some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger",
object: "with",
lots: "of",
stuff
}
: shortThing;
const obj4 = conditionIsTruthy
? shortThing
: {
some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger",
object: "with",
lots: "of",
stuff
};
const obj5 = conditionIsTruthy
? { some: "long", object: "with", lots: "of", stuff }
: {
some: "eeeeeeeeeeeeven looooooooooooooooooooooooooooooonger",
object: "with",
lots: "of",
stuff
};
`;