// =============================================================================
// =ALEKSI TESTS - PREPEND
// =============================================================================

@import "aleksi/lists/prepend";

@include test-module('The prepend function')
{
  @include test('should modify the length of arglist to which it appends')
  {
    $res: prepend($mix-list, $int);
    @include assert-equal(length($res), length($mix-list) + 1);
  }

  @include test('should add item at the beginning of the arglist')
  { 
    $res: prepend($mix-list, $int);
    $first: nth($res, 1);
    @include assert-equal($first, $int);
  }

  @include test('should accept an arglist and handle it exactly like a list')
  {
    $res: prepend($args-list, $int);
    $first: nth($res, 1);
    @include assert-equal(length($res), length($args-list) + 1);
    @include assert-equal($first, $int);
  }
}