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) • 527 B
text/typescript
describe('hello component', () => {
beforeEach(angular.mock.module('app', ($provide: ng.auto.IProvideService) => {
$provide.factory('app', () => {
return {
templateUrl: 'app/hello.html'
};
});
}));
it('should render hello world', inject(($rootScope: ng.IRootScopeService, $compile: ng.ICompileService) => {
const element = $compile('<app>Loading...</app>')($rootScope);
$rootScope.$digest();
const h1 = element.find('h1');
expect(h1.html()).toEqual('Hello World!');
}));
});