True 4.0.0

@mixin _true-assert-results() [private]

Get an official result, record it in the database and output, provide details as necessary, and end the assertion.

Parameters & Output

$assert: (*)

Value to consider

$expected: (*)

Expected match

$unequal: false (bool)

Set to true if the comparison is expected to fail

{CSS output} (code block)

  • Document the passing or failing result of the test

Requires

@mixin _true-pass-details() [private]

@mixin _true-fail-details() [private]

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

@mixin _true-update-stats-count() [private]

@mixin _true-context-pop() [private]

@function _true-get-result() [private]

Used By

@mixin assert-true()

@function _true-is-truthy() [private]

Check that a value is truthy (empty lists and strings return false)

Parameters & Return

$assert: (*)

Value to consider

@return (bool)

Used By

@mixin assert-true()

@mixin _true-pass-details() [private]

Ouptut a success message for passing tests

Map Properties & Output

{CSS output} (code block)

  • a passing-test comment with the name of the passing assertion

Requires

@mixin _true-message() [private]

@function _true-context() [private]

Used By

@mixin _true-assert-results() [private]

@mixin _true-fail-details() [private]

Failure message, with appropriate details to help you debug various common problems.

Parameters

$assert: (*)

The assertion value

$expected: (*)

The expected value

$terminal: $true-terminal-output (bool)

whether to use the terminal as an output stream

Requires

@mixin _true-message() [private]

@function _true-context() [private]

@function _true-variable-details() [private]

@function _true-edgefail-notes() [private]

Used By

@mixin _true-assert-results() [private]

@function _true-variable-details() [private]

Provide the details (type, list-separator, quotation) for a given variable - used to provide context in failure reporting

Parameters

$var: (*)

Pass in asserted and expected values individually to retrieve comparable details for both

Used By

@mixin _true-fail-details() [private]

@function _true-edgefail-notes() [private]

There are some common test failures that can be confusing, where results look identical in the output, but represent different values internally. This function looks for those edge-case failures and adds a clarifying note in the results.

Parameters & Return

$one: (*)

One of the values being compared

$two: (*)

The other calue being compared

@return (null | string)

A helpful note related to your edge-case, when appropriate

Used By

@mixin _true-fail-details() [private]