Skip to content

consistent-spacing-between-blocks fires when defining tests inside a function #389

@perrin4869

Description

@perrin4869

I got around to trying out 11.1.10, and found the following regression:

import { expect } from "chai";

const createTests = () => {
    it("test", () => expect(true).to.equal(true));
};

createTests();

It errors with:

  4:5  error  Expected line break before this statement  mocha/consistent-spacing-between-blocks

I checked, this error did not happen on v11.0.0 and on v10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions