• Decorate a function with meta-data to be used with cy.pipe. Adds a display name and arguments of a function.

    Type Parameters

    • T extends Function

    Parameters

    • name: string

      The name of the function to be displayed in the Cypress Command Log. The parameter is only required if the function passed to cy.pipe is anonymous

    • fn: T

      Function to decorate

    Returns T

    Example

    const getProp = loggable('getProp', prop => obj => obj[prop])
    
  • Decorate a function with meta-data to be used with cy.pipe. Adds arguments of a function.

    Type Parameters

    • T extends Function

    Parameters

    • fn: T

      Function to decorate

    Returns T

    Example

    const getProp = loggable(prop => function getProp(obj) { return obj[prop] })
    

Generated using TypeDoc