Skip to content

Type context of spec and assertion functions #9

Description

@demurgos

Mocha sets the value of the this variable for the functions passed to describe and test/it.
This allows to dynamically configure the behaviour of the tests (skip tests, define timeout, ...)

Their website mentions the following methods:

  • this.skip
  • this.retries
  • this.slow
  • this.timeout

I wasn't able to find a "structured" API documentation. There are more methods available when checking the source code, but supporting only the documented methods would be a good start.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions