Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sass tests too #842

Merged
merged 2 commits into from
Dec 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number Diff line number Diff line change
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",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you want different script names here.

"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
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body .div {
color: blue;
}
21 changes: 21 additions & 0 deletions test/expected-sass/inheritance.css
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.content-navigation {
border-color: #3bbfce;
color: #2ca2af;
}

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