Skip to content

Commit 26f6338

Browse files
authored
Add testcase (stylelint#48)
1 parent db6975a commit 26f6338

File tree

4 files changed

+71
-2
lines changed

4 files changed

+71
-2
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,14 @@
4343
"debug": "npm run mocha -- --inspect-brk"
4444
},
4545
"dependencies": {
46-
"@babel/core": ">=7.1.0"
46+
"@babel/core": ">=7.2.2"
4747
},
4848
"peerDependencies": {
4949
"postcss": ">=5.0.0",
5050
"postcss-syntax": ">=0.36.0"
5151
},
5252
"devDependencies": {
53-
"autoprefixer": "^9.4.3",
53+
"autoprefixer": "^9.4.4",
5454
"chai": "^4.2.0",
5555
"codecov": "^3.1.0",
5656
"json5": "^2.1.0",

test/fixtures/styled-props.jsx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import styled from "styled-components";
2+
3+
const Component = styled.div.attrs({
4+
className: "someClassName",
5+
})`
6+
color: red;
7+
`;
8+
9+
export default Component;

test/fixtures/styled-props.jsx.json

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
{
2+
"raws": {},
3+
"type": "root",
4+
"nodes": [
5+
{
6+
"raws": {
7+
"semicolon": true,
8+
"after": "\n"
9+
},
10+
"type": "root",
11+
"nodes": [
12+
{
13+
"raws": {
14+
"before": "\n\t",
15+
"between": ": "
16+
},
17+
"type": "decl",
18+
"source": {
19+
"start": {
20+
"line": 6,
21+
"column": 2
22+
},
23+
"input": {
24+
"file": "styled-props.jsx"
25+
},
26+
"end": {
27+
"line": 6,
28+
"column": 12
29+
}
30+
},
31+
"prop": "color",
32+
"value": "red"
33+
}
34+
],
35+
"source": {
36+
"input": {
37+
"file": "styled-props.jsx"
38+
},
39+
"start": {
40+
"line": 5,
41+
"column": 4
42+
},
43+
"inline": false,
44+
"lang": "css",
45+
"syntax": {}
46+
}
47+
}
48+
],
49+
"source": {
50+
"input": {
51+
"file": "styled-props.jsx"
52+
},
53+
"start": {
54+
"line": 1,
55+
"column": 1
56+
},
57+
"lang": "jsx"
58+
}
59+
}

test/supports.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ describe("should support for each CSS in JS package", () => {
3737
"react-native.mjs",
3838
"styled-components.js",
3939
"styled-opts.mjs",
40+
"styled-props.jsx",
4041
"tpl-decl.mjs",
4142
"tpl-in-tpl.mjs",
4243
"tpl-selector.mjs",

0 commit comments

Comments
 (0)