Skip to content

Commit 835d6f3

Browse files
authored
Add sass tests too (#842)
* Add sass tests too * Remove cross-env
1 parent 4e8c5de commit 835d6f3

File tree

9 files changed

+376
-31
lines changed

9 files changed

+376
-31
lines changed

package-lock.json

+280
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
1111
"fix": "npm run lint -- --fix",
1212
"mocha": "mocha",
13-
"test": "mocha"
13+
"test": "npm run test:node-sass && npm run test:dart-sass",
14+
"test:node-sass": "mocha",
15+
"test:dart-sass": "mocha -- --sass"
1416
},
1517
"repository": {
1618
"type": "git",
@@ -52,6 +54,7 @@
5254
"node-sass": "^7.0.1",
5355
"postcss": "^8.4.5",
5456
"rimraf": "^3.0.2",
57+
"sass": "^1.45.1",
5558
"vinyl": "^2.2.1"
5659
}
5760
}

test/expected-sass/empty.css

Whitespace-only changes.

test/expected-sass/indent.css

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
body .div {
2+
color: blue;
3+
}

test/expected-sass/inheritance.css

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
body {
2+
background: pink;
3+
}
4+
5+
footer {
6+
background: red;
7+
}
8+
9+
.error, .badError {
10+
border: #f00;
11+
background: #fdd;
12+
}
13+
14+
.error.intrusion, .intrusion.badError {
15+
font-size: 1.3em;
16+
font-weight: bold;
17+
}
18+
19+
.badError {
20+
border-width: 3px;
21+
}

test/expected-sass/mixins.css

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#data {
2+
float: left;
3+
margin-left: 10px;
4+
}
5+
#data th {
6+
text-align: center;
7+
font-weight: bold;
8+
}
9+
#data td, #data th {
10+
padding: 2px;
11+
}

test/expected-sass/variables.css

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.content-navigation {
2+
border-color: #3bbfce;
3+
color: #2ca2af;
4+
}
5+
6+
.border {
7+
padding: 8px;
8+
margin: 8px;
9+
border-color: #3bbfce;
10+
}

0 commit comments

Comments
 (0)