Jasmine uses describe
to begin and name a test suite.
For readability purposes this rule enforces that there is a new line between declarations within a suite.
Declarations are it
, describe
, beforeEach
, afterEach
, beforeAll
, afterAll
This rule triggers a warning (is set to 1 by default) whenever it encounters declarations not separated by a new line.
The following patterns are considered warnings:
describe("", function() {
it("", function(){});
it("", function(){});
});
describe("", function() {
beforeEach("", function(){});
it("", function(){});
});
describe("", function() {
describe("", function() {});
describe("", function() {});
});
The following patterns are not warnings:
describe("", function() {
describe("", function(){});
});
describe("", function() {
it("", function(){});
it("", function(){});
});
describe("", function() {
it("", function(){});
});
describe("", function() {});
describe("", function() {
var a = 1;
beforeEach(() => {})
it("", function(){});
});