sass-test.sh
v1.4.0sass-test.sh
A script for testing Sass libraries by comparing compiled output.
It supports both Ruby sass
and Libsass
implementations according of what is installed.
Installation
Install it via npm:
npm install sass-test.sh --save
You can set your package.json
to use sass-test.sh.
If your use cases are not in the test/
folder, set the path as script argument:
{
"scripts": {
"test": "sass-test [test directory|scss test files]"
}
}
Lanch your tests
npm test
Usage
In the default usage, the script searches for test cases into the test/
folder.
You can set up another folder or directly a specific test case.
sass-test folder/
sass-test folder/testcase.scss
sass-test folder/testcase1.scss folder/testcase2.scss
The default script mode only show test status.
You can automatically regenerate test results, with the regenerate
mode:
sass-test --regenerate folder/
You can also use the interactive
mode.
In error cases, it will ask you if you want to see the differences or to regenerate the test result:
sass-test --interactive folder/
Projects using it
- herow.scss: A time-saving Sass grid system.
- chewing-grid.css: A CSS Grid ideal for card listing design like tiles, videos or articles listing
Are you using sass-test.sh? Let me know about it or add it directly with a PR.
Other Sass testing lib
Not satisfied with sass-test.sh? Maybe you should try theses awesome projects:
- SassUnit: A Ruby gem for comparing compiled output.
- SassyTester: A minimalistic function tester in Sass.
- True: Unit tests for Sass.
How to Contribute
- Star the project!
- Report a bug that you have found.
- Tweet or blog about sass-test.sh and Let me know about it.
- Pull requests are also highly appreciated.
Author & Community
sass-test.sh is under MIT License.
It was created & is maintained by Thomas ZILLIOX.