angular-nevera-generator
Version:
Yeoman AngularJS scaffold a webapp with Angular 1 written in ES6 (Babel), TypeScript through Webpack or SystemJS including tools Gulp 4, ESLint, Browsersync and Karma
16 lines (15 loc) • 585 B
text/typescript
describe('header component', () => {
beforeEach(angular.mock.module('app', ($provide: ng.auto.IProvideService) => {
$provide.factory('fountainHeader', () => {
return {
templateUrl: 'app/header.html'
};
});
}));
it('should render \'Fountain Generator\'', inject(($rootScope: ng.IRootScopeService, $compile: ng.ICompileService) => {
const element = $compile('<fountain-header></fountain-header>')($rootScope);
$rootScope.$digest();
const header = element.find('a');
expect(header.html().trim()).toEqual('Fountain Generator');
}));
});