Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new-line-before-expect doesn't allow multiline expects. #354

Open
C0DK opened this issue Aug 8, 2022 · 1 comment
Open

new-line-before-expect doesn't allow multiline expects. #354

C0DK opened this issue Aug 8, 2022 · 1 comment
Labels

Comments

@C0DK
Copy link

C0DK commented Aug 8, 2022

Describe the bug
new-line-before-expect doesn't see preceding expect if it's in a multiple case.

i.e this fails (on the last line):

    expect("foo").toEqual("foo");
    expect("foo").toEqual(
      "foo"
    );
    expect("foo").toEqual("foo");

This does not

    expect("foo").toEqual("foo");
    expect("foo").toEqual("foo");
    expect("foo").toEqual("foo");

To Reproduce

Steps to reproduce the behaviour

describe('the bug', () => {
  it('happens', () => {
    expect('foo').toEqual('foo');
    expect('foo').toEqual('foo');
    expect('foo').toEqual('foo');
  });
});

Expected behaviour

That it wouldn't fail

Context

  • Node.js version: 17.9.0
  • eslint-plugin-jasmine version: 4.1.3
  • eslint version:
  • Operating system:
@C0DK C0DK added the bug label Aug 8, 2022
@ChrisMBarr
Copy link

This might be related, but I have some code where I expected errors in a few place but I only get one error unless I put a line between then.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants