Ability to break on : for objects (#314)
This commit is contained in:
1 parent
3aa267d5e8
commit
409d4b6eb5
4 files changed
+147
-17
No files matched your search
@@ -901,14 +901,14 @@ function logical12b(y: number): number {
|
||||
*/
|
||||
function logical13(x: number): Array<{ x: string }> {
|
||||
return [
|
||||
{ x: x && \"bar\" },
|
||||
{ x: true && \"bar\" },
|
||||
{ x: true && false },
|
||||
{ x: false && false },
|
||||
{ x: 1 && \"bar\" },
|
||||
{ x: \"foo\" && \"bar\" },
|
||||
{ x: \"foo\" && \"bar\" },
|
||||
{ x: \"foo\" && \"bar\" }
|
||||
{ x: x && \"bar\" },
|
||||
{ x: true && \"bar\" },
|
||||
{ x: true && false },
|
||||
{ x: false && false },
|
||||
{ x: 1 && \"bar\" },
|
||||
{ x: \"foo\" && \"bar\" },
|
||||
{ x: \"foo\" && \"bar\" },
|
||||
{ x: \"foo\" && \"bar\" }
|
||||
];
|
||||
}
|
||||
|
||||
@@ -917,14 +917,14 @@ function logical13(x: number): Array<{ x: string }> {
|
||||
*/
|
||||
function logical14(x: number): Array<{ x: string }> {
|
||||
return [
|
||||
{ x: x || \"bar\" },
|
||||
{ x: false || \"bar\" },
|
||||
{ x: false || true },
|
||||
{ x: true || false },
|
||||
{ x: 0 || \"bar\" },
|
||||
{ x: \"foo\" || \"bar\" },
|
||||
{ x: \"foo\" || \"bar\" },
|
||||
{ x: \"foo\" || \"bar\" }
|
||||
{ x: x || \"bar\" },
|
||||
{ x: false || \"bar\" },
|
||||
{ x: false || true },
|
||||
{ x: true || false },
|
||||
{ x: 0 || \"bar\" },
|
||||
{ x: \"foo\" || \"bar\" },
|
||||
{ x: \"foo\" || \"bar\" },
|
||||
{ x: \"foo\" || \"bar\" }
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -690,6 +690,71 @@ method()
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test object-prop-break-in.js 1`] = `
|
||||
"const a = classnames({
|
||||
\"some-prop\": this.state.longLongLongLongLongLongLongLongLongTooLongProp
|
||||
});
|
||||
|
||||
const b = classnames({
|
||||
\"some-prop\": this.state.longLongLongLongLongLongLongLongLongTooLongProp === true
|
||||
});
|
||||
|
||||
const c = classnames({
|
||||
\"some-prop\": [ \"foo\", \"bar\", \"foo\", \"bar\", \"foo\", \"bar\", \"foo\", \"bar\", \"foo\" ]
|
||||
});
|
||||
|
||||
const d = classnames({
|
||||
\"some-prop\": () => {}
|
||||
});
|
||||
|
||||
const e = classnames({
|
||||
\"some-prop\": function bar() {}
|
||||
});
|
||||
|
||||
const f = classnames({
|
||||
\"some-prop\": { foo: \"bar\", bar: \"foo\", foo: \"bar\", bar: \"foo\", foo: \"bar\" }
|
||||
});
|
||||
|
||||
const g = classnames({
|
||||
\"some-prop\": longLongLongLongLongLongLongLongLongLongLongLongLongTooLongVar || 1337
|
||||
});
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
const a = classnames({
|
||||
\"some-prop\": this.state.longLongLongLongLongLongLongLongLongTooLongProp
|
||||
});
|
||||
|
||||
const b = classnames({
|
||||
\"some-prop\": (
|
||||
this.state.longLongLongLongLongLongLongLongLongTooLongProp === true
|
||||
)
|
||||
});
|
||||
|
||||
const c = classnames({
|
||||
\"some-prop\": [ \"foo\", \"bar\", \"foo\", \"bar\", \"foo\", \"bar\", \"foo\", \"bar\", \"foo\" ]
|
||||
});
|
||||
|
||||
const d = classnames({
|
||||
\"some-prop\": () => {
|
||||
}
|
||||
});
|
||||
|
||||
const e = classnames({
|
||||
\"some-prop\": function bar() {
|
||||
}
|
||||
});
|
||||
|
||||
const f = classnames({
|
||||
\"some-prop\": { foo: \"bar\", bar: \"foo\", foo: \"bar\", bar: \"foo\", foo: \"bar\" }
|
||||
});
|
||||
|
||||
const g = classnames({
|
||||
\"some-prop\": (
|
||||
longLongLongLongLongLongLongLongLongLongLongLongLongTooLongVar || 1337
|
||||
)
|
||||
});
|
||||
"
|
||||
`;
|
||||
|
||||
exports[`test optional-type-name.js 1`] = `
|
||||
"type Foo = (any) => string
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
const a = classnames({
|
||||
"some-prop": this.state.longLongLongLongLongLongLongLongLongTooLongProp
|
||||
});
|
||||
|
||||
const b = classnames({
|
||||
"some-prop": this.state.longLongLongLongLongLongLongLongLongTooLongProp === true
|
||||
});
|
||||
|
||||
const c = classnames({
|
||||
"some-prop": [ "foo", "bar", "foo", "bar", "foo", "bar", "foo", "bar", "foo" ]
|
||||
});
|
||||
|
||||
const d = classnames({
|
||||
"some-prop": () => {}
|
||||
});
|
||||
|
||||
const e = classnames({
|
||||
"some-prop": function bar() {}
|
||||
});
|
||||
|
||||
const f = classnames({
|
||||
"some-prop": { foo: "bar", bar: "foo", foo: "bar", bar: "foo", foo: "bar" }
|
||||
});
|
||||
|
||||
const g = classnames({
|
||||
"some-prop": longLongLongLongLongLongLongLongLongLongLongLongLongTooLongVar || 1337
|
||||
});
|
||||
Reference in new issue
Block a user