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




Showcase yourself and your brand

Get free news, tips, and tricks
to create a remarkable experience for your readers.




Recommended Pages
Page Explorer List Name To Ui Region
Page-explorer: adding page navigation easily to your website

With the page-explorer component, you can add an explorer like panel that will list your pages in a list or collapsible tree fashion



Task Runner