A tslint rule to add newlines around test members (describe, it, test, beforeEach, etc)
npm install tslint-newlines-between-testsA tslint rule to ensure newlines between test members, for example, this
``typescript`
describe('foo', () => {
beforeAll(setup);
afterAll(teardown);
beforeEach(setup);
afterEach(teardown);
it('should foo', () => {});
it('should not bar', () => {});
});
describe('bar', () => {
beforeAll(setup);
afterAll(teardown);
beforeEach(setup);
afterEach(teardown);
it('should bar', () => {});
it('should not foo', () => {});
});
will become this:
`typescript
describe('foo', () => {
beforeAll(setup);
afterAll(teardown);
beforeEach(setup);
afterEach(teardown);
it('should foo', () => {});
it('should not bar', () => {});
});
describe('bar', () => {
beforeAll(setup);
afterAll(teardown);
beforeEach(setup);
afterEach(teardown);
it('should bar', () => {});
it('should not foo', () => {});
});
``