0.1.9 • Published 5 years ago

nobed v0.1.9

Weekly downloads
355
License
ISC
Repository
github
Last release
5 years ago

Description

Nobed is a command line tool to remove testbed and related code from angular typescript unit spec(s) to speed up spec runs and remove unncessary setup for unit tests.

import { async, ComponentFixture, TestBed } from '@angular/core/testing';

import { TestComponent } from './test.component';

describe('TestComponent', () => {
  let component: TestComponent;
  let fixture: ComponentFixture<TestComponent>;

  beforeEach(async(() => {
    TestBed.configureTestingModule({
      declarations: [ TestComponent ]
    })
    .compileComponents();
  }));

  beforeEach(() => {
    fixture = TestBed.createComponent(TestComponent);
    component = fixture.componentInstance;
    fixture.detectChanges();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});

becomes this

import { TestComponent } from './test.component';

describe('TestComponent', () => {
  let component: TestComponent;

  beforeEach(() => {
    component = new TestComponent();
  });

  it('should create', () => {
    expect(component).toBeTruthy();
  });
});

Installation

yarn add nobed --dev

Usage

modified and/or untracked spec file(s):

yarn run nobed

single spec file:

yarn run nobed app/components/notes/notes.component.spec.ts

entire directory spec files:

yarn run nobed app/components

Contributing

  • make a branch based off master
  • make desired code changes
  • submit your pull request and assign it to a developer who can ship it

Publishing

  • make sure master is up-to-date
  • npm run patch-release

Issues

https://github.com/callrail/nobed/issues

Reporting Issues

  • make sure you are on the latest nobed version and run yarn install before submitting any tickets
  • create a new issue in Issues tab
0.1.9

5 years ago

0.1.8

5 years ago

0.1.4

6 years ago

0.1.3

6 years ago

0.1.2

6 years ago

0.1.0

6 years ago

0.0.10

6 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.6

6 years ago

0.0.5

6 years ago

0.0.4

6 years ago