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 should not require new line on single block #324

Open
felipeissa opened this issue Jun 2, 2021 · 0 comments
Open
Labels

Comments

@felipeissa
Copy link

Describe the bug

According to the new-line-before-expect documentation, the following is not a warning:

describe("", function() {
it("", function() {
expect(1).toBe(1);
});
});

However I'm receiving a warning for this line of code, which has the same structure.

of(null).subscribe(() =>
expect(spy).toHaveBeenCalled()
);

but if I add braces, it doesn't fail:

of(null).subscribe(() =>{
expect(spy).toHaveBeenCalled();
});

To Reproduce

create a test which does a subscription with a single line expectation in a body without braces.

Expected behaviour

should not display warning

  • Node.js version: 10.16.0
  • eslint-plugin-jasmine version: 4.1.2
  • eslint version: 7.6.0
  • Operating system: Windows
@felipeissa felipeissa added the bug label Jun 2, 2021
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

1 participant