Type alias UIOptions

UIOptions: {
    aggregateTagsToFileHeading?: boolean | "withoutAncestors" | "onlyAncestors" | AllTagsName[];
    ansiCustomColorMap?: Record<number, string>;
    buildInfo?: BuildInfo;
    expandErrorDetails?: boolean;
    hideAncestorTags?: boolean;
    hideAncestorTitles?: boolean;
    htmlTitle?: string;
    includeLogs?: boolean;
    removeAtSignOnTags?: boolean | TagKind[];
    showTagNameOnBlockTags?: boolean;
    showTextOnTestSummaryMeta?: boolean;
    statusToIconMap?: Partial<Record<UIAssertion["status"], string>>;
    style?: string;
    tagTextAndIconFormatter?: ((tag, tagText) => Pick<UITag, "text" | "icon">);
    titleFormatter?: ((title) => string);
}

Options for when rendering the output for html

Type declaration

  • Optional aggregateTagsToFileHeading?: boolean | "withoutAncestors" | "onlyAncestors" | AllTagsName[]

    Aggregates tags on the specific tests up to the title. Choose to aggregate test tags, with or without ancestor. Or aggregate only selected tags by passing an array of tags.

    Example

    { aggregateTagsToFileHeading: ["@remarks"] }
    
    { aggregateTagsToFileHeading: "onlyAncestors" }
    

    Default

    false
    
  • Optional ansiCustomColorMap?: Record<number, string>

    Overrides specific colors in the error output. The key is the ANSI color you want to override and the value should be a HEX color.

    Example

    { ansiCustomColorMap: { 0: '#001', 1: '#B00' }
    
  • Optional buildInfo?: BuildInfo

    Displays build link close to heading

  • Optional expandErrorDetails?: boolean

    Expands the error details element if there is an error on the assertion

    Default

    false
    
  • Optional hideAncestorTags?: boolean

    Hides the tags from ancestors (describe blocks) on individual test result

    Default

    false
    
  • Optional hideAncestorTitles?: boolean

    Hide the breadcrumbs from ancestors on invidual test result

    Default

    false
    

    Example

    false: `describe > describe > test`
    true: `test`
  • Optional htmlTitle?: string

    Sets the <title> in the head of the generated HTML file

    Default

    Test results
    
  • Optional includeLogs?: boolean

    Render console.log output in the report

    Default

    true
    
  • Optional removeAtSignOnTags?: boolean | TagKind[]

    Removes the @ symbol on on the tag name in the generated output.

    Default

    false
    

    Example

    true:
    `@beta` -> `beta`
    false:
    `@beta` -> `@beta`
  • Optional showTagNameOnBlockTags?: boolean

    Shows or hides the tag name for block tags

    Default

    true
    

    Example

    true:
    `@remarks: tag content`
    false:
    `tag content`
  • Optional showTextOnTestSummaryMeta?: boolean

    Show text next to the summary for skipped, todo, failing and passing tests. Screen reader text will still read text with number even if hiding text.

    Example

    true:
    `Todo: 2`
    false:
    `2`

    Default

    true
    
  • Optional statusToIconMap?: Partial<Record<UIAssertion["status"], string>>

    Maps a specific status to a supplied icon, overrides default.

    Example

    { statusToIconMap: { passed: '🎉' } }
    
  • Optional style?: string

    Custom CSS styling to pass in, will be placed below any existing styling in the script tag in the header

    Example

    { style: ":root { --tag-background-color: #FFF; }" }
    
  • Optional tagTextAndIconFormatter?: ((tag, tagText) => Pick<UITag, "text" | "icon">)
      • (tag, tagText): Pick<UITag, "text" | "icon">
      • Custom formatter for converting text of tag before rendering. Add icon property if you want to display an icon instead of the text when rendering. When icon is set, text will be screen reader only.

        Parameters

        • tag: TestBlockTag

          current tag being formatted

        • tagText: string

          tag text being formatted, this is the actual text in case when block tag has several tags

        Returns Pick<UITag, "text" | "icon">

  • Optional titleFormatter?: ((title) => string)
      • (title): string
      • Custom formatting of test file path

        Parameters

        • title: string

          filepath of file

        Returns string

Generated using TypeDoc