Skip to content

Commit 0df4012

Browse files
committed
Merged comment test for #34 with existing keyframe test.
It appears that each at-rule requires it's own "above comment" test rather than a generic one. Updating existing tests is less duplication than having dedicated comment tests.
1 parent 7487047 commit 0df4012

File tree

4 files changed

+70
-168
lines changed

4 files changed

+70
-168
lines changed

test/cases/comment.at-rule.css

Lines changed: 0 additions & 13 deletions
This file was deleted.

test/cases/comment.at-rule.json

Lines changed: 0 additions & 146 deletions
This file was deleted.

test/cases/keyframes.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
@keyframes fade {
2+
/* from above */
23
from {
4+
/* from inside */
35
opacity: 0;
46
}
7+
8+
/* to above */
59
to {
10+
/* to inside */
611
opacity: 1;
712
}
813
}

test/cases/keyframes.json

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,68 +6,124 @@
66
"type": "keyframes",
77
"name": "fade",
88
"keyframes": [
9+
{
10+
"type": "comment",
11+
"comment": " from above ",
12+
"position": {
13+
"start": {
14+
"line": 2,
15+
"column": 3
16+
},
17+
"end": {
18+
"line": 2,
19+
"column": 19
20+
}
21+
}
22+
},
923
{
1024
"type": "keyframe",
1125
"values": [
1226
"from"
1327
],
1428
"declarations": [
29+
{
30+
"type": "comment",
31+
"comment": " from inside ",
32+
"position": {
33+
"start": {
34+
"line": 4,
35+
"column": 5
36+
},
37+
"end": {
38+
"line": 4,
39+
"column": 22
40+
}
41+
}
42+
},
1543
{
1644
"type": "declaration",
1745
"property": "opacity",
1846
"value": "0",
1947
"position": {
2048
"start": {
21-
"line": 3,
49+
"line": 5,
2250
"column": 5
2351
},
2452
"end": {
25-
"line": 3,
53+
"line": 5,
2654
"column": 15
2755
}
2856
}
2957
}
3058
],
3159
"position": {
3260
"start": {
33-
"line": 2,
61+
"line": 3,
3462
"column": 3
3563
},
3664
"end": {
37-
"line": 4,
65+
"line": 6,
3866
"column": 4
3967
}
4068
}
4169
},
70+
{
71+
"type": "comment",
72+
"comment": " to above ",
73+
"position": {
74+
"start": {
75+
"line": 8,
76+
"column": 3
77+
},
78+
"end": {
79+
"line": 8,
80+
"column": 17
81+
}
82+
}
83+
},
4284
{
4385
"type": "keyframe",
4486
"values": [
4587
"to"
4688
],
4789
"declarations": [
90+
{
91+
"type": "comment",
92+
"comment": " to inside ",
93+
"position": {
94+
"start": {
95+
"line": 10,
96+
"column": 5
97+
},
98+
"end": {
99+
"line": 10,
100+
"column": 20
101+
}
102+
}
103+
},
48104
{
49105
"type": "declaration",
50106
"property": "opacity",
51107
"value": "1",
52108
"position": {
53109
"start": {
54-
"line": 6,
110+
"line": 11,
55111
"column": 5
56112
},
57113
"end": {
58-
"line": 6,
114+
"line": 11,
59115
"column": 15
60116
}
61117
}
62118
}
63119
],
64120
"position": {
65121
"start": {
66-
"line": 5,
122+
"line": 9,
67123
"column": 3
68124
},
69125
"end": {
70-
"line": 7,
126+
"line": 12,
71127
"column": 4
72128
}
73129
}
@@ -79,7 +135,7 @@
79135
"column": 1
80136
},
81137
"end": {
82-
"line": 8,
138+
"line": 13,
83139
"column": 2
84140
}
85141
}

0 commit comments

Comments
 (0)