Skip to content

Apteco/ngth

Repository files navigation

What is ngth

ngth is the spiritual successor/extension to ng-bullet. It offers the same functionality as well as resetting spy objects and mock services.

Getting Started

Installation

Using npm

npm install @apteco/ngth

Using yarn*

yarn add @apteco/ngth

Spec Files

Most Angular spec files configure components like so:

beforeEach(async(() => {
  TestBed.configureTestingModule({
    declarations: [
      /*list of components*/
    ],
    imports: [
      /* list of providers*/
    ]
  }).compileComponents();
}));

With ngth we change this to:

    import { configureSuite } from '@apteco/ngth';
    ...
    configureSuite(() => {
        TestBed.configureTestingModule({
            declarations: [ /*list of components goes here*/ ],
            imports: [ /* list of providers goes here*/ ]
        })
    });

There is no longer any need to call TestBed#compileComponents as ngth will call this and make sure that all components are compiled once and only once.

About

ng-bullet successor to help speed up angular testing

Resources

License

Stars

Watchers

Forks

Packages

No packages published