Skip to content

A tool for Sass testing, with npm integration, works by comparing compiled output.

License

Notifications You must be signed in to change notification settings

tzi/sass-test.sh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sass-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.

sass-test.sh script demonstration

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

  • Build Status herow.scss: A time-saving Sass grid system.
  • Build Status 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

  1. Star the project!
  2. Report a bug that you have found.
  3. Tweet or blog about sass-test.sh and Let me know about it.
  4. Pull requests are also highly appreciated.

Author & Community

sass-test.sh is under MIT License.
It was created & is maintained by Thomas ZILLIOX.

About

A tool for Sass testing, with npm integration, works by comparing compiled output.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages