Add test for nested ternary with arrow func (#3039)
parent
3c5dae3702
commit
d90aec1a1d
|
@ -15,7 +15,7 @@
|
|||
},
|
||||
"dependencies": {
|
||||
"babel-code-frame": "7.0.0-alpha.12",
|
||||
"babylon": "7.0.0-beta.23",
|
||||
"babylon": "7.0.0-beta.28",
|
||||
"camelcase": "4.1.0",
|
||||
"chalk": "2.1.0",
|
||||
"cjk-regex": "1.0.1",
|
||||
|
|
|
@ -92,6 +92,30 @@ aaaaaaaaaaaaaaa
|
|||
|
||||
`;
|
||||
|
||||
exports[`nested.js 1`] = `
|
||||
let icecream = what == "cone"
|
||||
? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`
|
||||
: p => \`here's your \${p} \${what}\`;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
let icecream =
|
||||
what == "cone"
|
||||
? p => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`)
|
||||
: p => \`here's your \${p} \${what}\`;
|
||||
|
||||
`;
|
||||
|
||||
exports[`nested.js 2`] = `
|
||||
let icecream = what == "cone"
|
||||
? p => !!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`
|
||||
: p => \`here's your \${p} \${what}\`;
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
let icecream =
|
||||
what == "cone"
|
||||
? p => (!!p ? \`here's your \${p} cone\` : \`just the empty cone for you\`)
|
||||
: p => \`here's your \${p} \${what}\`;
|
||||
|
||||
`;
|
||||
|
||||
exports[`parenthesis.js 1`] = `
|
||||
debug ? this.state.isVisible ? "partially visible" : "hidden" : null;
|
||||
debug ? this.state.isVisible && somethingComplex ? "partially visible" : "hidden" : null;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
let icecream = what == "cone"
|
||||
? p => !!p ? `here's your ${p} cone` : `just the empty cone for you`
|
||||
: p => `here's your ${p} ${what}`;
|
|
@ -800,9 +800,9 @@ babel-types@^6.26.0:
|
|||
lodash "^4.17.4"
|
||||
to-fast-properties "^1.0.3"
|
||||
|
||||
babylon@7.0.0-beta.23:
|
||||
version "7.0.0-beta.23"
|
||||
resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.23.tgz#c7e8e7a389b6f6c6212ceac1a3905c7e73d7e45a"
|
||||
babylon@7.0.0-beta.28:
|
||||
version "7.0.0-beta.28"
|
||||
resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.28.tgz#14521f26a19918db2b5f4aca89e62e02e0644be7"
|
||||
|
||||
babylon@^6.13.0, babylon@^6.17.2:
|
||||
version "6.17.3"
|
||||
|
|
Loading…
Reference in New Issue