Skip to content

Rule proposal: Forbid afterEach etc callback with serial #166

Closed
@novemberborn

Description

@novemberborn

This implies the callback only applies to serial tests, which is not the case. If I'm not mistaken regular test.afterEach hooks still run serially when run after a test.serial() test.

See avajs/ava#1178.

Fail

test.serial.before(fn);
test.serial.beforeEach(fn);
test.serial.afterEach(fn);
test.serial.after(fn);
test.serial.afterEach.always(fn);
test.serial.after.always(fn);

Valid

test.before(fn);
test.beforeEach(fn);
test.afterEach(fn);
test.after(fn);
test.afterEach.always(fn);
test.after.always(fn);

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