blob: f1d66fe48e0d6d4c9689095fc609c8e94b409dfb [file] [log] [blame]
Matteo Scandolof6acdbe2016-12-13 10:29:37 -08001/// <reference path="../../typings/index.d.ts" />
2
3import * as angular from 'angular';
4import 'angular-mocks';
5import {main} from './main';
6
7describe('main component', () => {
8 beforeEach(() => {
9 angular
10 .module('app', ['app/main.html'])
11 .component('app', main);
12 angular.mock.module('app');
13 });
14
Matteo Scandoloa4a47112016-12-16 10:06:13 -080015 it('should render the header and footer', angular.mock.inject(($rootScope: ng.IRootScopeService, $compile: ng.ICompileService) => {
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080016 const element = $compile('<app></app>')($rootScope);
17 $rootScope.$digest();
18 expect(element.find('xos-header').length).toEqual(1);
Matteo Scandolo266907e2016-12-20 13:41:42 -080019 // expect(element.find('xos-footer').length).toEqual(1);
Matteo Scandolof6acdbe2016-12-13 10:29:37 -080020 }));
21});