Skip to content

Commit

Permalink
✅ Add tests for multiple pseudo class combos inc. interpolations
Browse files Browse the repository at this point in the history
  • Loading branch information
bgriffith authored and tonyganch committed Jun 21, 2016
1 parent be05fba commit 94ea238
Show file tree
Hide file tree
Showing 47 changed files with 2,285 additions and 121 deletions.
38 changes: 5 additions & 33 deletions test/scss/pseudoc/0.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,16 @@
"type": "pseudoClass",
"content": [
{
"type": "interpolation",
"content": [
{
"type": "variable",
"content": [
{
"type": "ident",
"content": "a",
"syntax": "scss",
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 5
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 4
},
"end": {
"line": 1,
"column": 5
}
}
],
"type": "ident",
"content": "test",
"syntax": "scss",
"start": {
"line": 1,
"column": 2
},
"end": {
"line": 1,
"column": 6
"column": 5
}
}
],
Expand All @@ -50,6 +22,6 @@
},
"end": {
"line": 1,
"column": 6
"column": 5
}
}
}
2 changes: 1 addition & 1 deletion test/scss/pseudoc/0.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
:#{$a}
:test
89 changes: 3 additions & 86 deletions test/scss/pseudoc/1.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"content": [
{
"type": "ident",
"content": "nth-child",
"content": "test-test",
"syntax": "scss",
"start": {
"line": 1,
Expand All @@ -13,89 +13,6 @@
"line": 1,
"column": 10
}
},
{
"type": "arguments",
"content": [
{
"type": "selector",
"content": [
{
"type": "typeSelector",
"content": [
{
"type": "interpolation",
"content": [
{
"type": "variable",
"content": [
{
"type": "ident",
"content": "i",
"syntax": "scss",
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 15
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 15
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 16
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 16
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 12
},
"end": {
"line": 1,
"column": 16
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 11
},
"end": {
"line": 1,
"column": 17
}
}
],
"syntax": "scss",
Expand All @@ -105,6 +22,6 @@
},
"end": {
"line": 1,
"column": 17
"column": 10
}
}
}
2 changes: 1 addition & 1 deletion test/scss/pseudoc/1.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
:nth-child(#{$i})
:test-test
82 changes: 82 additions & 0 deletions test/scss/pseudoc/11.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"type": "pseudoClass",
"content": [
{
"type": "ident",
"content": "not",
"syntax": "scss",
"start": {
"line": 1,
"column": 2
},
"end": {
"line": 1,
"column": 4
}
},
{
"type": "arguments",
"content": [
{
"type": "selector",
"content": [
{
"type": "class",
"content": [
{
"type": "ident",
"content": "heading",
"syntax": "scss",
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 13
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 13
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 13
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 14
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 14
}
}
1 change: 1 addition & 0 deletions test/scss/pseudoc/11.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:not(.heading)
82 changes: 82 additions & 0 deletions test/scss/pseudoc/12.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"type": "pseudoClass",
"content": [
{
"type": "ident",
"content": "not",
"syntax": "scss",
"start": {
"line": 1,
"column": 2
},
"end": {
"line": 1,
"column": 4
}
},
{
"type": "arguments",
"content": [
{
"type": "selector",
"content": [
{
"type": "typeSelector",
"content": [
{
"type": "ident",
"content": "h1",
"syntax": "scss",
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 7
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 7
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 6
},
"end": {
"line": 1,
"column": 7
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 5
},
"end": {
"line": 1,
"column": 8
}
}
],
"syntax": "scss",
"start": {
"line": 1,
"column": 1
},
"end": {
"line": 1,
"column": 8
}
}
1 change: 1 addition & 0 deletions test/scss/pseudoc/12.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
:not(h1)
Loading

0 comments on commit 94ea238

Please sign in to comment.