True 4.0.0

@mixin test-module()

aliased as describe()

Test Modules are optional, and can be used to group tests and other modules for organizational purposes. Modules can be nested for additional organization.

Parameters

$name: (string)

module name

@content (code block)

Include all the tests & modules that are part of this module

Example

scss
// Module Group
@include test-module('zip [function]') {
  // Test 1
  @include test('Returns two lists zipped together') {
    @include assert-equal(
      zip(a b c, 1 2 3),
      (a 1, b 2, c 3));
  }

  // Test 2
  @include test('Returns three zipped lists') {
    @include assert-equal(
      zip(1px 1px 3px, solid dashed solid, red green blue),
      (1px solid red, 1px dashed green, 3px solid blue));
  }
}
css compiled
@charset "UTF-8";
/* # Module: zip [function] */
/* ------------------------ */
/* Test: Returns two lists zipped together */
/*   ✔ [assert-equal] Returns two lists zipped together */
/*  */
/* Test: Returns three zipped lists */
/*   ✔ [assert-equal] Returns three zipped lists */
/*  */
/*  */

Requires

@mixin _true-module-start() [private]

@mixin _true-module-stop() [private]

Used By

@mixin describe()

@mixin test()

aliased as it()

The test() wrapper-mixin groups related assertions, to describe the behavior they are testing. Tests should always contain one or more assertions.

Parameters

$name: (string)

Describe what is being tested

@content (code block)

Include any assertions that are part of this test

Example

scss
@include test('Returns lists zipped together') {
  @include assert-equal(
    zip(a b c, 1 2 3),
    (a 1, b 2, c 3));
  @include assert-equal(
    zip(1px 1px 3px, solid dashed solid, red green blue),
    (1px solid red, 1px dashed green, 3px solid blue));
}
css compiled
@charset "UTF-8";
/* Test: Returns lists zipped together */
/*   ✔ [assert-equal] Returns lists zipped together */
/*   ✔ [assert-equal] Returns lists zipped together */
/*  */

Requires

@mixin _true-test-start() [private]

@mixin _true-test-stop() [private]

Used By

@mixin it()