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
22 lines (19 loc) • 750 B
JavaScript
var angular = require('angular');
require('angular-mocks');
var main = require('./main');
describe('main component', function () {
beforeEach(function () {
angular
.module('app', ['<%- templateUrl %>'])
.component('app', main);
angular.mock.module('app');
});
it('should render the header, title, techs and footer', angular.mock.inject(function ($rootScope, $compile) {
var element = $compile('<app>Loading...</app>')($rootScope);
$rootScope.$digest();
expect(element.find('fountain-header').length).toEqual(1);
expect(element.find('fountain-title').length).toEqual(1);
expect(element.find('fountain-techs').length).toEqual(1);
expect(element.find('fountain-footer').length).toEqual(1);
}));
});