Add test for #6988 (#8391)

* Add test for #6988

* Move files
This commit is contained in:
fisker Cheung authored and GitHub committed 2020-05-24 17:27:25 +03:00
1 parent 6d7524c76a
commit 4b95c408ae
2 files changed
+89

No files matched your search

@@ -196,3 +196,82 @@ type D6 /*0*/ = /*1*/ a & b;
================================================================================
`;
exports[`type-arguments.ts - {"semi":false} format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
semi: false
| printWidth
=====================================input======================================
// #6988
// functional component with ugly linebreak
export const MyLongNamedReactFunctionalComponent1: FunctionComponent<ALongNamedInterface1 & ALongNamedInterface2> = (props) => {}
// functional component with valid linebreak
export const MyLongNamedReactFunctionalComponent2: FunctionComponent<ALongNamedInterface1 | ALongNamedInterface2> = (props) => {}
// functional component with valid linebreak
export const MyLongNamedReactFunctionalComponent3: FunctionComponent<ALongNamedInterface1, ALongNamedInterface2> = (props) => {}
=====================================output=====================================
// #6988
// functional component with ugly linebreak
export const MyLongNamedReactFunctionalComponent1: FunctionComponent<
ALongNamedInterface1 & ALongNamedInterface2
> = (props) => {}
// functional component with valid linebreak
export const MyLongNamedReactFunctionalComponent2: FunctionComponent<
ALongNamedInterface1 | ALongNamedInterface2
> = (props) => {}
// functional component with valid linebreak
export const MyLongNamedReactFunctionalComponent3: FunctionComponent<
ALongNamedInterface1,
ALongNamedInterface2
> = (props) => {}
================================================================================
`;
exports[`type-arguments.ts format 1`] = `
====================================options=====================================
parsers: ["typescript"]
printWidth: 80
| printWidth
=====================================input======================================
// #6988
// functional component with ugly linebreak
export const MyLongNamedReactFunctionalComponent1: FunctionComponent<ALongNamedInterface1 & ALongNamedInterface2> = (props) => {}
// functional component with valid linebreak
export const MyLongNamedReactFunctionalComponent2: FunctionComponent<ALongNamedInterface1 | ALongNamedInterface2> = (props) => {}
// functional component with valid linebreak
export const MyLongNamedReactFunctionalComponent3: FunctionComponent<ALongNamedInterface1, ALongNamedInterface2> = (props) => {}
=====================================output=====================================
// #6988
// functional component with ugly linebreak
export const MyLongNamedReactFunctionalComponent1: FunctionComponent<
ALongNamedInterface1 & ALongNamedInterface2
> = (props) => {};
// functional component with valid linebreak
export const MyLongNamedReactFunctionalComponent2: FunctionComponent<
ALongNamedInterface1 | ALongNamedInterface2
> = (props) => {};
// functional component with valid linebreak
export const MyLongNamedReactFunctionalComponent3: FunctionComponent<
ALongNamedInterface1,
ALongNamedInterface2
> = (props) => {};
================================================================================
`;
@@ -0,0 +1,10 @@
// #6988
// functional component with ugly linebreak
export const MyLongNamedReactFunctionalComponent1: FunctionComponent<ALongNamedInterface1 & ALongNamedInterface2> = (props) => {}
// functional component with valid linebreak
export const MyLongNamedReactFunctionalComponent2: FunctionComponent<ALongNamedInterface1 | ALongNamedInterface2> = (props) => {}
// functional component with valid linebreak
export const MyLongNamedReactFunctionalComponent3: FunctionComponent<ALongNamedInterface1, ALongNamedInterface2> = (props) => {}