Skip to content

Restrict test modifier chaining #1182

Closed
@novemberborn

Description

@novemberborn

Currently test modifiers allow silly and confusing combinations. We have linting rules to warn about them, and disallow some of them in the type definitions. We should go further and restrict the modifier chains so only useful combinations are allowed, but provide useful error feedback if disallowed combinations are used.

Examples of silly chains:

  • test.always.afterEach.cb()
  • test.after.test()
  • test.always.always.serial.always.afterEach(() => {})

Examples of confusing chains:

See also the discussion in #1005.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions