An open API service indexing awesome lists of open source software.

https://github.com/dir01/tslint-newlines-between-tests

A tslint rule that adds newlines around test members (describe, it, test, beforeEach, etc)
https://github.com/dir01/tslint-newlines-between-tests

Last synced: 5 months ago
JSON representation

A tslint rule that adds newlines around test members (describe, it, test, beforeEach, etc)

Awesome Lists containing this project

README

          

# tslint-newlines-between-tests

A 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', () => {});
});
```