Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "utils/asserts"

Index

Functions

assertAttributeNotEmpty

  • assertAttributeNotEmpty(elem: ElementImpl, attr: string, message?: undefined | string): boolean
  • Asserts element has the given attribute with non-empty value

    Parameters

    • elem: ElementImpl
    • attr: string
    • Optional message: undefined | string

    Returns boolean

assertElement

  • assertElement(node: NodeImpl, action?: NodeImpl, message?: undefined | string): boolean
  • Asserts the given node is an element node

    Parameters

    • node: NodeImpl
    • Optional action: NodeImpl
    • Optional message: undefined | string

    Returns boolean

assertEmptyText

  • assertEmptyText(node: NodeImpl, action?: NodeImpl, message?: undefined | string): boolean
  • Asserts the given node is an empty text node

    Parameters

    • node: NodeImpl
    • Optional action: NodeImpl
    • Optional message: undefined | string

    Returns boolean

assertHasCDataChild

  • assertHasCDataChild(node: NodeImpl, message?: undefined | string): boolean
  • Asserts the given node has CData child node.

    Parameters

    • node: NodeImpl
    • Optional message: undefined | string

    Returns boolean

assertHasCommentChild

  • assertHasCommentChild(node: NodeImpl, message?: undefined | string): boolean
  • Asserts the given node has comment child node.

    Parameters

    • node: NodeImpl
    • Optional message: undefined | string

    Returns boolean

assertHasProcessingInstructionChild

  • assertHasProcessingInstructionChild(node: NodeImpl, message?: undefined | string): boolean
  • Asserts the given node has processing instruction child node.

    Parameters

    • node: NodeImpl
    • Optional message: undefined | string

    Returns boolean

assertKnownAction

  • assertKnownAction(action: ElementImpl, message?: undefined | string): boolean
  • Asserts the given action tag is supported

    Parameters

    • action: ElementImpl
    • Optional message: undefined | string

    Returns boolean

assertNoWsAttr

  • assertNoWsAttr(action: ElementImpl, message: string): boolean
  • Asserts the given action has no 'ws' attribute.

    Parameters

    • action: ElementImpl
    • message: string

    Returns boolean

assertNotRoot

  • assertNotRoot(node: NodeImpl, action: NodeImpl, message?: undefined | string): boolean
  • Asserts the given node is not the root

    Parameters

    • node: NodeImpl
    • action: NodeImpl
    • Optional message: undefined | string

    Returns boolean

assertTextChildNotEmpty

  • assertTextChildNotEmpty(node: NodeImpl, message?: undefined | string): boolean
  • Asserts the given action has one text node child or no child at all

    Parameters

    • node: NodeImpl
    • Optional message: undefined | string

    Returns boolean

assertTextChildOrNothing

  • assertTextChildOrNothing(node: NodeImpl, message?: undefined | string): boolean
  • Asserts the given action has one text node child or no child at all

    Parameters

    • node: NodeImpl
    • Optional message: undefined | string

    Returns boolean

Generated using TypeDoc