reporting
mixins
report
@mixin report($terminal: $true-terminal-output) { ... }
Description
Report results summary to CSS and/or command line
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$terminal | Whether or not to use terminal output | Bool | $true-terminal-output |
Requires
- [mixin]
_true-message
- [function]
_true-report-message
variables
true-terminal-output
$true-terminal-output: true !default;
Description
Whether or not to use the terminal as output stream
Type
Bool
Used by
- [mixin]
_true-fail-details
testing
mixins
assert-true
@mixin assert-true($assert, $description: '') { ... }
Description
Assert that a parameter is true
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$assert | Assert | Any | —none |
$description | Assert description | String | '' |
Requires
- [mixin]
_true-fail-details
- [mixin]
_true-assert-start
- [mixin]
_true-assert-stop
assert-false
@mixin assert-false($assert, $description: '') { ... }
Description
Assert that a parameter is false
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$assert | Assert | Any | —none |
$description | Assert description | String | '' |
Requires
- [mixin]
_true-fail-details
- [mixin]
_true-assert-start
- [mixin]
_true-assert-stop
assert-equal
@mixin assert-equal($assert, $expected, $description: '') { ... }
Description
Assert that two parameters are equal
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$assert | Assert | Any | —none |
$expected | Expected result | Any | —none |
$description | Assert description | String | '' |
Requires
- [function]
_true-is-equal
- [mixin]
_true-fail-details
- [mixin]
_true-assert-start
- [mixin]
_true-assert-stop
assert-unequal
@mixin assert-unequal($assert, $expected, $description: '') { ... }
Description
Assert that two parameters are unequal
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$assert | Assert | Any | —none |
$expected | Expected result | Any | —none |
$description | Assert description | String | '' |
Requires
- [function]
_true-is-equal
- [mixin]
_true-fail-details
- [mixin]
_true-assert-start
- [mixin]
_true-assert-stop
assert
@mixin assert($description) { ... }
Description
Define a CSS-output assertion
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$description | Assert description | String | —none |
Content
This mixin allows extra content to be passed (through the @content
directive). Role: Use `input()` and `expect()` mixins to define blocks for comparison
Requires
- [mixin]
_true-assert-start
- [mixin]
_true-assert-stop
- [function]
_true-selector
input
@mixin input() { ... }
Description
Describe the test content to be evaluated The output will be compared against the results of the expect()
mixin.
Parameters
None.
Content
This mixin allows extra content to be passed (through the @content
directive).
expect
@mixin expect() { ... }
Description
Describe the output content to be expected. The output will be compared against the results of the input()
mixin.
Parameters
None.
Content
This mixin allows extra content to be passed (through the @content
directive).
test-module
@mixin test-module($name) { ... }
Description
Define a Test Module
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$name | Module name | String | —none |
Content
This mixin allows extra content to be passed (through the @content
directive). Role: Include all the tests that are part of this module
Requires
- [mixin]
_true-module-start
- [mixin]
_true-module-stop
test
@mixin test($name) { ... }
Description
Describe a Test
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$name | Test bame | String | —none |
Content
This mixin allows extra content to be passed (through the @content
directive). Role: Include the assertions that are part of this test
Requires
- [mixin]
_true-test-start
- [mixin]
_true-test-stop
- [function]
_true-selector
x_private
mixins
[private] _true-assert-start
@mixin _true-assert-start($name) { ... }
Description
True assert start helper
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$name | Assert name | String | —none |
Requires
- [mixin]
_true-context
Used by
- [mixin]
assert-true
- [mixin]
assert-false
- [mixin]
assert-equal
- [mixin]
assert-unequal
- [mixin]
assert
[private] _true-assert-stop
@mixin _true-assert-stop($result) { ... }
Description
True assert sort helper
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$result | Assert result | String | —none |
Requires
- [mixin]
_true-context
- [mixin]
_true-update
Used by
- [mixin]
assert-true
- [mixin]
assert-false
- [mixin]
assert-equal
- [mixin]
assert-unequal
- [mixin]
assert
[private] _true-fail-details
@mixin _true-fail-details($expected, $returned, $terminal: $true-terminal-output) { ... }
Description
Fail details
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$expected | Expected result | Any | —none |
$returned | Returned result | Any | —none |
$terminal | Whether or not to use terminal output | Bool | $true-terminal-output |
Requires
- [variable]
true-terminal-output
- [function]
_true-context
Used by
- [mixin]
assert-true
- [mixin]
assert-false
- [mixin]
assert-equal
- [mixin]
assert-unequal
[private] _true-spacer
@mixin _true-spacer() { ... }
Description
Output a spacer comment
Parameters
None.
Output
A spacer comment
[private] _true-message
@mixin _true-message($message, $output: comments) { ... }
Description
Output a message to CSS comments, or command line terminal (via debug/warn)
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$message | Message to output | String | —none |
$output | Type of output, either | String | comments |
Requires
- [variable]
-tnl
- [function]
_true-str-split
Used by
- [mixin]
report
- [mixin]
_true-module-start
- [mixin]
_true-module-stop
- [mixin]
_true-test-start
- [mixin]
_true-test-stop
[private] _true-module-start
@mixin _true-module-start($name) { ... }
Description
Module start helper
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$name | Module name | String | —none |
Requires
- [mixin]
_true-reset
- [mixin]
_true-context
- [mixin]
_true-message
Used by
- [mixin]
test-module
[private] _true-module-stop
@mixin _true-module-stop() { ... }
Description
Module stop helper
Parameters
None.
Requires
- [mixin]
_true-update
- [mixin]
_true-reset
- [mixin]
_true-context
- [mixin]
_true-message
Used by
- [mixin]
test-module
[private] _true-reset
@mixin _true-reset($scope) { ... }
Description
Reset helper
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$scope | Scope to reset | String | —none |
Requires
- [variable]
_true-results-reset
- [variable]
_true-results
Used by
- [mixin]
_true-module-start
- [mixin]
_true-module-stop
- [mixin]
_true-test-start
- [mixin]
_true-test-stop
[private] _true-update
@mixin _true-update($scope, $results) { ... }
Description
Update results
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$scope | Scope to update results from | String | —none |
$results | Results | List | —none |
Requires
- [function]
_true-get-results
- [function]
_true-map-increment
- [variable]
_true-results
Used by
- [mixin]
_true-assert-stop
- [mixin]
_true-module-stop
- [mixin]
_true-test-stop
[private] _true-context
@mixin _true-context($scope, $name) { ... }
Description
Update the current context
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$scope | Either | String | —none |
$name | Name of current scope | String | —none |
Requires
- [variable]
_true-context
Used by
- [mixin]
_true-assert-start
- [mixin]
_true-assert-stop
- [mixin]
_true-module-start
- [mixin]
_true-module-stop
- [mixin]
_true-test-start
- [mixin]
_true-test-stop
[private] _true-test-start
@mixin _true-test-start($name) { ... }
Description
Test start helper
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$name | Test name | String | —none |
Requires
- [mixin]
_true-reset
- [mixin]
_true-context
- [mixin]
_true-message
Used by
- [mixin]
test
[private] _true-test-stop
@mixin _true-test-stop() { ... }
Description
Test stop helper
Parameters
None.
Requires
- [mixin]
_true-update
- [mixin]
_true-reset
- [mixin]
_true-context
- [mixin]
_true-message
- [function]
_true-get-result
Used by
- [mixin]
test
variables
[private] -tnl
$-tnl: '\a ';
Description
New line helper
Type
String
Used by
- [mixin]
_true-message
- [function]
_true-report-message
[private] _true-results-reset
$_true-results-reset: (
run: 0,
pass: 0,
fail: 0,
output-to-css: 0,
);
Description
Initialized results map
Type
Map
Used by
- [variable]
_true-results
- [mixin]
_true-reset
[private] _true-results
$_true-results: (
global: $_true-results-reset,
module: $_true-results-reset,
test: $_true-results-reset,
);
Description
Results map
Type
Map
Map structure
Map keyName | Map keyDescription | Map keyType | Map keyValue |
---|---|---|---|
global | Global results | Map | $_true-results-reset |
module | Results for current module | Map | $_true-results-reset |
test | Results for current test | Map | $_true-results-reset |
Requires
- [variable]
_true-results-reset
Used by
- [mixin]
_true-reset
- [function]
_true-get-results
- [mixin]
_true-update
[private] _true-context
$_true-context: (
module: null,
test: null,
assert: null,
);
Description
True current context
Type
Map
Map structure
Map keyName | Map keyDescription | Map keyType | Map keyValue |
---|---|---|---|
module | —none | String | null |
test | —none | String | null |
assert | —none | String | null |
Used by
- [mixin]
_true-context
- [function]
_true-context
functions
[private] _true-selector
@function _true-selector($scope) { ... }
Description
Return a CSS selector for the current context
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$scope | Scope | List | —none |
Returns
String
—CSS selector
Requires
- [function]
_true-context
Used by
[private] _true-get-results
@function _true-get-results($scope) { ... }
Description
Results getter
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$scope | Scope to get results from | String | —none |
Requires
- [variable]
_true-results
Used by
- [function]
_true-get-result
- [mixin]
_true-update
- [function]
_true-report-message
[private] _true-get-result
@function _true-get-result($scope) { ... }
Description
Single result getter
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$scope | Scope to get result form | String | —none |
Requires
- [function]
_true-get-results
Used by
- [mixin]
_true-test-stop
[private] _true-report-message
@function _true-report-message($scope: test, $lines: single) { ... }
Description
Report message
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$scope | Scope | String | test |
$lines | Lines | String | single |
Returns
String
—Reported message
Requires
- [variable]
-tnl
- [function]
_true-get-results
Used by
- [mixin]
report
[private] _true-context
@function _true-context($scope) { ... }
Description
Get information on current context
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$scope | Either | String | —none |
Returns
String
Requires
- [variable]
_true-context
Used by
- [mixin]
_true-fail-details
- [function]
_true-selector
[private] _true-map-increment
@function _true-map-increment($base, $add) { ... }
Description
Add map values together
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$base | Initial map | Map | —none |
$add | Extra map | Map | —none |
Returns
Map
Used by
- [mixin]
_true-update
[private] _true-str-split
@function _true-str-split($string, $substring) { ... }
Description
Split a string
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$string | String to split | String | —none |
$substring | Delimiter | String | —none |
Returns
List
—$string
fragments
Used by
- [mixin]
_true-message
[private] _true-is-equal
@function _true-is-equal($one, $two) { ... }
Description
Check for strict equality
Parameters
parameterName | parameterDescription | parameterType | parameterDefault value |
---|---|---|---|
$one | First value | Any | —none |
$two | Second value | Any | —none |
Returns
Bool
Used by
- [mixin]
assert-equal
- [mixin]
assert-unequal