Skip to content

Instantly share code, notes, and snippets.

@colelawrence
Last active July 28, 2016 15:57
Show Gist options
  • Select an option

  • Save colelawrence/06baa4840d8cd7414572f1a06d7df25e to your computer and use it in GitHub Desktop.

Select an option

Save colelawrence/06baa4840d8cd7414572f1a06d7df25e to your computer and use it in GitHub Desktop.
Angular 2 TestComponentBuilder example
import {
it,
inject,
describe,
beforeEachProviders,
TestComponentBuilder
} from '@angular/core/testing';
import { PMBDDAmountComponent } from './pmb-dd-amount.component';
describe('DropdownComponent', () => {
beforeEachProviders(() => [
TestComponentBuilder,
PMBDDAmountComponent
]);
it ('should work', inject([TestComponentBuilder], (tcb) => {
// Add real test here
return tcb.createAsync(PMBDDAmountComponent).then((fixture) => {
fixture.detectChanges();
});
}));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment