Skip to content

Commit

Permalink
add tests from prettier#6259
Browse files Browse the repository at this point in the history
  • Loading branch information
thorn0 committed Apr 23, 2020
1 parent ab1ea71 commit 84531e0
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 0 deletions.
58 changes: 58 additions & 0 deletions tests/multiparser_js_css/__snapshots__/jsfmt.spec.js.snap
Expand Up @@ -103,6 +103,64 @@ const Icon3 = styled.div\`
================================================================================
`;

exports[`issue-6259.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
printWidth: 80
| printWidth
=====================================input======================================
export const Group = styled.div\`
margin: 0;
.input {
margin: 0;
}
\${StyledInput}:not(:first-child) {
margin: 0;
}
& > :not(.\${inputWrap}):not(\${Button}) {
display: flex;
}
\`
const yesFrame = (
...args: Interpolation<ThemedStyledProps<{}, Theme>>[]
) => css\`
\${ChatRoot}[data-frame="yes"] & {
\${css({}, ...args)}
}
\`
=====================================output=====================================
export const Group = styled.div\`
margin: 0;
.input {
margin: 0;
}
\${StyledInput}:not(:first-child) {
margin: 0;
}
& > :not(.\${inputWrap}):not(\${Button}) {
display: flex;
}
\`;
const yesFrame = (
...args: Interpolation<ThemedStyledProps<{}, Theme>>[]
) => css\`
\${ChatRoot}[data-frame="yes"] & {
\${css({}, ...args)}
}
\`;
================================================================================
`;

exports[`styled-components.js format 1`] = `
====================================options=====================================
parsers: ["babel"]
Expand Down
23 changes: 23 additions & 0 deletions tests/multiparser_js_css/issue-6259.js
@@ -0,0 +1,23 @@
export const Group = styled.div`
margin: 0;
.input {
margin: 0;
}
${StyledInput}:not(:first-child) {
margin: 0;
}
& > :not(.${inputWrap}):not(${Button}) {
display: flex;
}
`

const yesFrame = (
...args: Interpolation<ThemedStyledProps<{}, Theme>>[]
) => css`
${ChatRoot}[data-frame="yes"] & {
${css({}, ...args)}
}
`

0 comments on commit 84531e0

Please sign in to comment.