UNPKG

generator-fountain-angular2

Version:

Yeoman Fountain generator to scaffold a webapp with Angular 2 written in ES6 (Babel), TypeScript through Webpack or SystemJS including tools Gulp 4, ESLint, Browsersync and Karma

24 lines (20 loc) 640 B
var <%- className %> = require('./<%- name %>'); var ng = require('@angular/core'); var ngTest = require('@angular/core/testing'); var MockComponent = ng.Component({ selector: 'mock', template: `<div <%- directiveName %>></div>` }) .Class({ constructor: function () {} }); describe('<%- directiveName %> directive', function () { beforeEach(async(function () { ngTest.TestBed.configureTestingModule({declarations: [MockComponent]}); ngTest.TestBed.compileComponents(); })); it('should render...', function () { const fixture = ngTest.TestBed.createComponent(MockComponent); fixture.detectChanges(); }); });