Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sass-true

Package Overview
Dependencies
Maintainers
1
Versions
27
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sass-true

Unit testing for Sass.

  • 2.0.0-beta.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
14K
increased by6.86%
Maintainers
1
Weekly downloads
 
Created
Source

True

Build Status

Verb

  1. To make true; shape, adjust, place, etc., exactly or accurately: True the wheels of a bicycle after striking a pothole.
  2. To make even, symmetrical, level, etc. (often followed by up): True up the sides of a door.
  3. To test your Sass code; debug, perfect, etc. (often using True): True your sweet plugin before you deploy.

At this point True can only test values (e.g. function returns), not property/value output (e.g. mixin output).

Install

in command line:

# ruby gem
gem install true

# bower package
bower install true

Command Line

This command-line tool uses Ruby and the Ruby Sass compiler.

true-cli [options] PATH

Options:

  • -s silent
  • -c config file
  • -d debug config file settings

Config file (optional):

options:
  color: true #enables colored output

# require ruby sass extension libraries
require:
  - "compass"
  - "serialy_sassy"

default location: test/true.yml

Usage

@import "true";

@include test-module('Utilities') {

  @include test('Map Add [function]') {
    $base: (one: 1, two: 1, three: 1);
    $add: (one: 1, two: 2, three: -1);

    $test: map-add($base, $add);
    $expect: (one: 2, two: 3, three: 0);
    @include assert-equal($test, $expect,
      'Returns the sum of two numeric maps');
  }

  @include test('Is Equal [function]') {
    $test: is-equal(1, 1rem);
    @include assert-equal($test, false,
      'Returns false for equal numbers with different units.');

    $test: is-equal(1, 1);
    @include assert-equal($test, true,
      'Returns true for numbers that are truely equal.');
  }
}

@include report;

Settings

There is only one setting: $true-terminal-output toggles output to the terminal on and off.

  • true will display a final summary of your test results in the terminal, and show detailed information on failing assertions. Required for true-cli.
  • false to turn off all terminal output. Required for Libsass.

Keywords

FAQs

Package last updated on 08 Jan 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc