ComboStrap UI - Unit Testing

Undraw My Documents

ComboStrap UI - Unit Testing

About

unit is just a semantic component to indicate a unit of sequence of code block.

It doesn't render and is used to create unit tests in documentation that are later used by an external test engine.

Syntax

  • The unit node may got the display=“none” property to not display the whole block
<unit display="none">
    <file txt nico.txt>
        A file content
    </file>
    <!--code-->
       A block of code 
    <!--code-->
    <console>
       The expectation result
    </console>
</unit>

Example

Default

<unit>
    <file txt nico.txt>
        File content
    </file>
    <!--code-->
        A code block may also come here but as we can't nest node in dokuwiki, we can put it in this example
    <!--code-->
    <console>
       Expectation or output of the code block
    </console>
</unit>
File content
    

A code block may also come here but as we can't nest node in dokuwiki, we can put it in this example

Expectation or output of the code block
    

Display: none

The unit node may got the display=“none” property to not display the whole block

The below code should not render.

<unit display="none">
    <file>
    </file>
   <console>
   </console>
</unit>
  • There will be no output
Task Runner