Skip to content

Commit

Permalink
Add sass tests too (#842)
Browse files Browse the repository at this point in the history
* Add sass tests too

* Remove cross-env
  • Loading branch information
XhmikosR committed Dec 29, 2021
1 parent 4e8c5de commit 835d6f3
Show file tree
Hide file tree
Showing 9 changed files with 376 additions and 31 deletions.
280 changes: 280 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion package.json
Expand Up @@ -10,7 +10,9 @@
"lint": "eslint --report-unused-disable-directives --ignore-path .gitignore .",
"fix": "npm run lint -- --fix",
"mocha": "mocha",
"test": "mocha"
"test": "npm run test:node-sass && npm run test:dart-sass",
"test:node-sass": "mocha",
"test:dart-sass": "mocha -- --sass"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -52,6 +54,7 @@
"node-sass": "^7.0.1",
"postcss": "^8.4.5",
"rimraf": "^3.0.2",
"sass": "^1.45.1",
"vinyl": "^2.2.1"
}
}
Empty file added test/expected-sass/empty.css
Empty file.
3 changes: 3 additions & 0 deletions test/expected-sass/indent.css
@@ -0,0 +1,3 @@
body .div {
color: blue;
}
21 changes: 21 additions & 0 deletions test/expected-sass/inheritance.css
@@ -0,0 +1,21 @@
body {
background: pink;
}

footer {
background: red;
}

.error, .badError {
border: #f00;
background: #fdd;
}

.error.intrusion, .intrusion.badError {
font-size: 1.3em;
font-weight: bold;
}

.badError {
border-width: 3px;
}
11 changes: 11 additions & 0 deletions test/expected-sass/mixins.css
@@ -0,0 +1,11 @@
#data {
float: left;
margin-left: 10px;
}
#data th {
text-align: center;
font-weight: bold;
}
#data td, #data th {
padding: 2px;
}
10 changes: 10 additions & 0 deletions test/expected-sass/variables.css
@@ -0,0 +1,10 @@
.content-navigation {
border-color: #3bbfce;
color: #2ca2af;
}

.border {
padding: 8px;
margin: 8px;
border-color: #3bbfce;
}

0 comments on commit 835d6f3

Please sign in to comment.