kuatsure/helpful-helpers

View on GitHub
test/functions.scss

Summary

Maintainability
Test Coverage
@import 'true';
@import '../functions';

@include test-module( 'Functions' ) {

  // Testing Functions
  @include test( 'Shade - no percentage' ) {
    $base: #fff;

    $test: shade( $base );

    $expect: gray;

    @include assert-equal(
      $test,
      $expect,
      'Returns the augmented color with a percentage of 50%'
    );
  }

  @include test( 'Shade - with percentage' ) {
    $base: #fff;

    $test: shade( $base, 20% );

    $expect: #ccc;

    @include assert-equal(
      $test,
      $expect,
      'Returns the augmented color with a paramed percentage'
    );
  }

  @include test( 'Tint - no percentage' ) {
    $base: #000;

    $test: tint( $base );

    $expect: gray;

    @include assert-equal(
      $test,
      $expect,
      'Returns the augmented color with a percentage of 50%'
    );
  }

  @include test( 'Tint - with percentage' ) {
    $base: #000;

    $test: tint( $base, 20% );

    $expect: #333;

    @include assert-equal(
      $test,
      $expect,
      'Returns the augmented color with a paramed percentage'
    );
  }
}