Skip to content

Commit ff18508

Browse files
committed
Added failing test for styled-components#55
1 parent a4ce9db commit ff18508

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

test/fixtures/interpolations/valid.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ const Box3 = styled(Box2)`
4242
`
4343

4444
// Multiline
45+
// prettier-ignore
4546
const Button4 = styled.button`
4647
display: block;
4748
${`
@@ -52,6 +53,7 @@ const Button4 = styled.button`
5253

5354
// Conditional
5455
const cond = true
56+
// prettier-ignore
5557
const Button5 = styled.button`
5658
display: block;
5759
${cond &&
@@ -63,10 +65,11 @@ const Button5 = styled.button`
6365

6466
// Conditional
6567
const cond2 = false
68+
// prettier-ignore
6669
const Button6 = styled.button`
6770
display: block;
6871
${cond2 &&
69-
`
72+
`
7073
color: ${cond2};
7174
`}
7275
background: blue;
@@ -79,3 +82,11 @@ const Button7 = styled.button`
7982
width: 20px;
8083
border: ${borderWidth} ${borderStyle} ${color};
8184
`
85+
86+
// Several interpolation statements in a block
87+
// prettier-ignore
88+
const Button8 = styled.button`
89+
${`display: block;`}
90+
${`color: ${color};`}
91+
${`background: blue;`}
92+
`

test/interpolations.test.js

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const path = require('path')
44
const processor = path.join(__dirname, '../src/index.js')
55
const rules = {
66
'block-no-empty': true,
7+
'declaration-block-no-duplicate-properties': true,
78
indentation: 2
89
}
910

0 commit comments

Comments
 (0)