Skip to content

dir01/tslint-newlines-between-tests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tslint-newlines-between-tests

A tslint rule to ensure newlines between test members, for example, this

    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:

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published