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 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
308 changes: 308 additions & 0 deletions package-lock.json

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

6 changes: 5 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",
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": "cross-env SASS_COMPILER=sass mocha"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity could you do something like mocha -- sass and pull the compiler off of argv instead of introducing cross-env?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could probably work (not mocha -- sass but mocha -- --sass, but seems more hacky from a quick look. Feel free to tweak it, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, wait. Let me try something.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I pushed a patch which does work but still seems hacky, but correct me if I'm wrong. Aren't we abusing the fact that mocha doesn't throw on unknown command line options?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm fine with it until it's a problem :)

},
"repository": {
"type": "git",
Expand Down Expand Up @@ -40,6 +42,7 @@
},
"devDependencies": {
"autoprefixer": "^10.4.0",
"cross-env": "^7.0.3",
"eslint": "^8.5.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.25.3",
Expand All @@ -52,6 +55,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.