Options
All
  • Public
  • Public/Protected
  • All
Menu

Initialize a new Base reporter.

All other reporters generally inherit from this reporter, providing stats such as test duration, number of tests passed / failed, etc.

see

https://mochajs.org/api/Mocha.reporters.Base.html

Hierarchy

Index

Constructors

constructor

  • Parameters

    Returns Base

  • deprecated

    Use the overload that accepts Mocha.Runner instead.

    Parameters

    Returns Base

Properties

failures

failures: Test[]

Test failures

runner

runner: Runner

The configured runner

stats

stats: Stats

Test run statistics

Static colors

colors: ColorMap

Static inlineDiffs

inlineDiffs: boolean

Inline diffs instead of +/-

see

https://mochajs.org/api/module-base#.inlineDiffs

Static symbols

symbols: SymbolMap

Static useColors

useColors: boolean

Enables coloring by default

see

https://mochajs.org/api/module-base#.useColors

Static window

window: object

Expose terminal window size

see

https://mochajs.org/api/module-base#.window

Type declaration

  • width: number

Methods

Optional done

  • done(failures: number, fn?: undefined | function): void
  • Parameters

    • failures: number
    • Optional fn: undefined | function

    Returns void

epilogue

  • epilogue(): void

Static color

  • color(type: string, str: string): string

Static generateDiff

  • generateDiff(actual: string, expected: string): string

Static list

  • list(failures: Test[]): void

Generated using TypeDoc