@import '../../lib/sizing';

$base-font-size: 14;

@include test-module('Sizing Functions with $base-font-size set to 14') {
  @include test('Given 28, rem conversion returns 2rem [function]') {
    $test: rem(28);
    $expect: 2rem;
    @include assert-equal($test, $expect, 'returns value of 2rem');
  }

  @include test('Given 21, rem conversion returns 1.5rem [function]') {
    $test: rem(21);
    $expect: 1.5rem;
    @include assert-equal($test, $expect, 'returns value of 1.5rem');
  }
}

@import '../../lib/sizing';

$base-font-size: 14;

@include test-module('Sizing Functions with $base-font-size set to 14') {
  @include test('Given 28, rem conversion returns 2rem [function]') {
    $test: rem(28);
    $expect: 2rem;
    @include assert-equal($test, $expect, 'returns value of 2rem');
  }

  @include test('Given 21, rem conversion returns 1.5rem [function]') {
    $test: rem(21);
    $expect: 1.5rem;
    @include assert-equal($test, $expect, 'returns value of 1.5rem');
  }
}

// Testing with strings, because there is wierdness with comparison when
// percision is invoked.
@include test-module('Test rem function with percision') {
  @include test('Given 16, rem conversion returns rem [function]') {
    $test: rem(16);
    $expect: '1.14286rem';
    @include assert-equal('#{$test}', '#{$expect}',
        'returns value of 1.14286rem');
  }

  @include test('Given 12, rem conversion returns rem [function]') {
    $test: rem(12);
    $expect: 0.85714rem;
    @include assert-equal('#{$test}', '#{$expect}',
        'returns value of 0.85714rem');
  }
}

@include report;

Add tests for sizes that invoke sass percision
Add tests for sizes that invoke sass percision
