Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface MochaGlobals

Variables added to the global scope by Mocha when run in the CLI.

Hierarchy

  • MochaGlobals

Index

Properties

after

Execute after running tests.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#after

afterEach

afterEach: HookFunction

Execute after each test case.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#afterEach

before

before: HookFunction

Execute before running tests.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#before

beforeEach

beforeEach: HookFunction

Execute before each test case.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#beforeEach

context

context: SuiteFunction

Describe a "suite" containing nested suites and tests.

  • Only available when invoked via the mocha CLI.

describe

describe: SuiteFunction

Describe a "suite" containing nested suites and tests.

  • Only available when invoked via the mocha CLI.

it

Describes a test case.

  • Only available when invoked via the mocha CLI.

run

run: run

setup

Execute before each test case.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#beforeEach

specify

specify: TestFunction

Describes a test case.

  • Only available when invoked via the mocha CLI.

suite

Describe a "suite" containing nested suites and tests.

  • Only available when invoked via the mocha CLI.

suiteSetup

suiteSetup: HookFunction

Execute before running tests.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#before

suiteTeardown

suiteTeardown: HookFunction

Execute after running tests.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#after

teardown

teardown: HookFunction

Execute after each test case.

  • Only available when invoked via the mocha CLI.
see

https://mochajs.org/api/global.html#afterEach

test

Describes a test case.

  • Only available when invoked via the mocha CLI.

xcontext

Pending suite.

  • Only available when invoked via the mocha CLI.

xdescribe

Pending suite.

  • Only available when invoked via the mocha CLI.

xit

Describes a pending test case.

  • Only available when invoked via the mocha CLI.

xspecify

Describes a pending test case.

  • Only available when invoked via the mocha CLI.

Generated using TypeDoc